mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Meta: Allow specifying the library type when invoking serenity_lib()
This will allow creating object libraries with this function.
This commit is contained in:
parent
c8febe5169
commit
d1e2d2a4df
Notes:
sideshowbarker
2024-07-17 01:00:06 +09:00
Author: https://github.com/trflynn89
Commit: d1e2d2a4df
Pull-request: https://github.com/SerenityOS/serenity/pull/23717
Issue: https://github.com/SerenityOS/serenity/issues/23625
Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 14 additions and 2 deletions
|
@ -53,9 +53,15 @@ endfunction()
|
|||
|
||||
if (NOT COMMAND serenity_lib)
|
||||
function(serenity_lib target_name fs_name)
|
||||
cmake_parse_arguments(PARSE_ARGV 2 SERENITY_LIB "" "TYPE" "")
|
||||
|
||||
if ("${SERENITY_LIB_TYPE}" STREQUAL "")
|
||||
set(SERENITY_LIB_TYPE SHARED)
|
||||
endif()
|
||||
|
||||
serenity_install_headers(${target_name})
|
||||
serenity_install_sources()
|
||||
add_library(${target_name} SHARED ${SOURCES} ${GENERATED_SOURCES})
|
||||
add_library(${target_name} ${SERENITY_LIB_TYPE} ${SOURCES} ${GENERATED_SOURCES})
|
||||
set_target_properties(${target_name} PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
set_target_properties(${target_name} PROPERTIES VERSION "serenity")
|
||||
install(TARGETS ${target_name} DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue