diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-12-29 12:55:23 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-30 14:18:12 +0100 |
commit | 0c84957eba4ef71ac45d7b1dcf6a79146448ebd5 (patch) | |
tree | fd936b1ff6fb75e64106ad4df5696f5546ee87bc /Meta/CMake | |
parent | 8e2efe78f7545df4d6ac761fc19f81643722ed36 (diff) | |
download | serenity-0c84957eba4ef71ac45d7b1dcf6a79146448ebd5.zip |
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.
Diffstat (limited to 'Meta/CMake')
-rw-r--r-- | Meta/CMake/utils.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Meta/CMake/utils.cmake b/Meta/CMake/utils.cmake index fed0607882..65392d46c5 100644 --- a/Meta/CMake/utils.cmake +++ b/Meta/CMake/utils.cmake @@ -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() |