mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
Meta: Add helper CMake function to link directly against LibUnicodeData
Rather than each CMakeLists.txt needing to import unicode_data.cmake and check if Unicode data generation is enabled, add a helper method to do this.
This commit is contained in:
parent
8e2efe78f7
commit
0c84957eba
Notes:
sideshowbarker
2024-07-17 21:57:11 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0c84957eba4 Pull-request: https://github.com/SerenityOS/serenity/pull/11491 Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/serenity_components.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/code_generators.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/unicode_data.cmake)
|
||||
|
||||
function(serenity_install_headers target_name)
|
||||
file(GLOB_RECURSE headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
|
||||
|
@ -152,3 +153,9 @@ function(embed_resource target section file)
|
|||
)
|
||||
target_sources("${target}" PRIVATE "${asm_file}")
|
||||
endfunction()
|
||||
|
||||
function(link_with_unicode_data target)
|
||||
if (DEFINED UNICODE_DATA_SOURCES)
|
||||
target_link_libraries("${target}" LibUnicodeData)
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
Loading…
Add table
Reference in a new issue