diff options
author | Itamar <itamar8910@gmail.com> | 2020-08-15 15:11:10 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-15 15:06:35 +0200 |
commit | 310063fed8a005b74dd2472ce812158fbb34d879 (patch) | |
tree | d6884568ed35f7fc67b23dcb0bfb096cd2cbb4f5 /CMakeLists.txt | |
parent | 311a355505bbf02a4df87befbb22d0ea4b678302 (diff) | |
download | serenity-310063fed8a005b74dd2472ce812158fbb34d879.zip |
Meta: Install source files at /usr/src/serenity
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 279188baa8..f019ab68f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,14 @@ function(serenity_install_headers target_name) endforeach() endfunction() +function(serenity_install_sources target_name) + file(GLOB_RECURSE sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h" "*.cpp") + foreach(source ${sources}) + get_filename_component(subdirectory ${source} DIRECTORY) + install(FILES ${source} DESTINATION usr/src/serenity/${target_name}/${subdirectory}) + endforeach() +endfunction() + function(serenity_generated_sources target_name) if(DEFINED GENERATED_SOURCES) set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED 1) @@ -78,6 +86,7 @@ endfunction() function(serenity_lib target_name fs_name) serenity_install_headers(${target_name}) + serenity_install_sources("Libraries/${target_name}") add_library(${target_name} ${SOURCES} ${GENERATED_SOURCES}) install(TARGETS ${target_name} ARCHIVE DESTINATION usr/lib) set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name}) @@ -86,6 +95,7 @@ endfunction() function(serenity_libc target_name fs_name) serenity_install_headers("") + serenity_install_sources("Libraries/LibC") add_library(${target_name} ${SOURCES}) install(TARGETS ${target_name} ARCHIVE DESTINATION usr/lib) set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name}) |