mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Install source files at /usr/src/serenity
This commit is contained in:
parent
311a355505
commit
310063fed8
Notes:
sideshowbarker
2024-07-19 03:37:07 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/310063fed8a Pull-request: https://github.com/SerenityOS/serenity/pull/3153 Issue: https://github.com/SerenityOS/serenity/issues/3152 Reviewed-by: https://github.com/awesomekling
3 changed files with 12 additions and 0 deletions
|
@ -1 +1,2 @@
|
|||
serenity_install_headers(AK)
|
||||
serenity_install_sources(AK)
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -270,5 +270,6 @@ add_custom_command(
|
|||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kernel.map DESTINATION res)
|
||||
|
||||
serenity_install_headers(Kernel)
|
||||
serenity_install_sources(Kernel)
|
||||
|
||||
add_subdirectory(Modules)
|
||||
|
|
Loading…
Reference in a new issue