mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:57:44 +00:00
Build: Support GENERATED_SOURCES in serenity_{bin,libc}() as well
This commit is contained in:
parent
dd7cd92de4
commit
4684e9a80f
1 changed files with 11 additions and 5 deletions
|
@ -59,11 +59,7 @@ function(serenity_install_headers target_name)
|
|||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(serenity_lib target_name fs_name)
|
||||
serenity_install_headers(${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})
|
||||
function(serenity_generated_sources target_name)
|
||||
if(DEFINED GENERATED_SOURCES)
|
||||
set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED 1)
|
||||
foreach(generated ${GENERATED_SOURCES})
|
||||
|
@ -73,17 +69,27 @@ function(serenity_lib target_name fs_name)
|
|||
endif()
|
||||
endfunction()
|
||||
|
||||
function(serenity_lib target_name fs_name)
|
||||
serenity_install_headers(${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})
|
||||
serenity_generated_sources(${target_name})
|
||||
endfunction()
|
||||
|
||||
function(serenity_libc target_name fs_name)
|
||||
serenity_install_headers("")
|
||||
add_library(${target_name} ${SOURCES})
|
||||
install(TARGETS ${target_name} ARCHIVE DESTINATION usr/lib)
|
||||
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name})
|
||||
target_link_directories(LibC PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||
serenity_generated_sources(${target_name})
|
||||
endfunction()
|
||||
|
||||
function(serenity_bin target_name)
|
||||
add_executable(${target_name} ${SOURCES})
|
||||
install(TARGETS ${target_name} RUNTIME DESTINATION bin)
|
||||
serenity_generated_sources(${target_name})
|
||||
endfunction()
|
||||
|
||||
function(compile_ipc source output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue