mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:57:46 +00:00
Build+TextEditor: Add a compile_json_gui() CMake helper
This makes it easier to include JSON GUI declarations in any app. :^)
This commit is contained in:
parent
119a0c5dee
commit
f67c876df0
2 changed files with 15 additions and 6 deletions
|
@ -137,6 +137,19 @@ function(serenity_bin target_name)
|
|||
serenity_generated_sources(${target_name})
|
||||
endfunction()
|
||||
|
||||
function(compile_json_gui 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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue