|
@@ -1,5 +1,6 @@
|
|
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/serenity_components.cmake)
|
|
|
+include(${CMAKE_CURRENT_LIST_DIR}/code_generators.cmake)
|
|
|
|
|
|
function(serenity_install_headers target_name)
|
|
|
file(GLOB_RECURSE headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
|
|
@@ -137,33 +138,6 @@ function(serenity_app target_name)
|
|
|
endif()
|
|
|
endfunction()
|
|
|
|
|
|
-function(compile_gml source output string_name)
|
|
|
- set(source ${CMAKE_CURRENT_SOURCE_DIR}/${source})
|
|
|
- add_custom_command(
|
|
|
- OUTPUT ${output}
|
|
|
- COMMAND ${write_if_different} ${output} ${CMAKE_SOURCE_DIR}/Meta/text-to-cpp-string.sh ${string_name} ${source}
|
|
|
- VERBATIM
|
|
|
- DEPENDS ${CMAKE_SOURCE_DIR}/Meta/text-to-cpp-string.sh
|
|
|
- MAIN_DEPENDENCY ${source}
|
|
|
- )
|
|
|
- get_filename_component(output_name ${output} NAME)
|
|
|
- add_custom_target(generate_${output_name} DEPENDS ${output})
|
|
|
-endfunction()
|
|
|
-
|
|
|
-
|
|
|
-function(compile_ipc source output)
|
|
|
- set(source ${CMAKE_CURRENT_SOURCE_DIR}/${source})
|
|
|
- add_custom_command(
|
|
|
- OUTPUT ${output}
|
|
|
- COMMAND ${write_if_different} ${output} ${CMAKE_BINARY_DIR}/Userland/DevTools/IPCCompiler/IPCCompiler ${source}
|
|
|
- VERBATIM
|
|
|
- DEPENDS IPCCompiler
|
|
|
- MAIN_DEPENDENCY ${source}
|
|
|
- )
|
|
|
- get_filename_component(output_name ${output} NAME)
|
|
|
- add_custom_target(generate_${output_name} DEPENDS ${output})
|
|
|
-endfunction()
|
|
|
-
|
|
|
function(embed_resource target section file)
|
|
|
get_filename_component(asm_file "${file}" NAME)
|
|
|
set(asm_file "${CMAKE_CURRENT_BINARY_DIR}/${target}-${section}.s")
|
|
@@ -177,23 +151,3 @@ function(embed_resource target section file)
|
|
|
)
|
|
|
target_sources("${target}" PRIVATE "${asm_file}")
|
|
|
endfunction()
|
|
|
-
|
|
|
-function(generate_state_machine source header)
|
|
|
- get_filename_component(header_name ${header} NAME)
|
|
|
- set(target_name "generate_${header_name}")
|
|
|
- # Note: This function is called twice with the same header, once in the kernel
|
|
|
- # and once in Userland/LibVT, this check makes sure that only one target
|
|
|
- # is generated for that header.
|
|
|
- if(NOT TARGET ${target_name})
|
|
|
- set(source ${CMAKE_CURRENT_SOURCE_DIR}/${source})
|
|
|
- set(output ${CMAKE_CURRENT_BINARY_DIR}/${header})
|
|
|
- add_custom_command(
|
|
|
- OUTPUT ${output}
|
|
|
- COMMAND ${write_if_different} ${output} ${CMAKE_BINARY_DIR}/Userland/DevTools/StateMachineGenerator/StateMachineGenerator ${source}
|
|
|
- VERBATIM
|
|
|
- DEPENDS StateMachineGenerator
|
|
|
- MAIN_DEPENDENCY ${source}
|
|
|
- )
|
|
|
- add_custom_target(${target_name} DEPENDS ${output})
|
|
|
- endif()
|
|
|
-endfunction()
|