summaryrefslogtreecommitdiff
path: root/Meta/CMake/code_generators.cmake
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2022-03-19 12:31:59 +0200
committerAndreas Kling <kling@serenityos.org>2022-03-19 22:02:44 +0100
commitfe7d28e8701258640b1d485394f4fff7b14099a1 (patch)
treed5c9d91210c7671381d56378021490995c2c6802 /Meta/CMake/code_generators.cmake
parentfc10bc3cb2e922a506d66accbdfbbc33bc3f5047 (diff)
downloadserenity-fe7d28e8701258640b1d485394f4fff7b14099a1.zip
CMake: Install generated IPC headers under /usr/include in compile_ipc()
Generated IPC headers are now installed under /usr/include in the system's filesystem image.
Diffstat (limited to 'Meta/CMake/code_generators.cmake')
-rw-r--r--Meta/CMake/code_generators.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Meta/CMake/code_generators.cmake b/Meta/CMake/code_generators.cmake
index cf1a7f045c..21b293b881 100644
--- a/Meta/CMake/code_generators.cmake
+++ b/Meta/CMake/code_generators.cmake
@@ -32,6 +32,10 @@ function(compile_ipc source output)
get_filename_component(output_name ${output} NAME)
add_custom_target(generate_${output_name} DEPENDS ${output})
add_dependencies(all_generated generate_${output_name})
+
+ string(LENGTH ${SerenityOS_SOURCE_DIR} root_source_dir_length)
+ string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${root_source_dir_length} -1 current_source_dir_relative)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION usr/include${current_source_dir_relative} OPTIONAL)
endfunction()
function(generate_state_machine source header)