Skip to content

Commit 8e3899d

Browse files
authored
Use TARGET_OBJECTS generator expression in CMake for core builds (maplibre#3484)
1 parent 08bdeeb commit 8e3899d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

platform/linux/linux.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ target_include_directories(
142142
include(${PROJECT_SOURCE_DIR}/vendor/nunicode.cmake)
143143
include(${PROJECT_SOURCE_DIR}/vendor/sqlite.cmake)
144144

145-
if(NOT ${ICU_FOUND} OR "${ICU_VERSION}" VERSION_LESS 62.0)
146-
message(STATUS "ICU not found or too old, using builtin.")
145+
if(NOT ${ICU_FOUND} OR "${ICU_VERSION}" VERSION_LESS 62.0 OR MLN_USE_BUILTIN_ICU)
146+
message(STATUS "ICU not found, too old or MLN_USE_BUILTIN_ICU requestd, using builtin.")
147147

148148
set(MLN_USE_BUILTIN_ICU TRUE)
149149
include(${PROJECT_SOURCE_DIR}/vendor/icu.cmake)
@@ -167,7 +167,7 @@ target_link_libraries(
167167
${WEBP_LIBRARIES}
168168
$<$<NOT:$<BOOL:${MLN_USE_BUILTIN_ICU}>>:ICU::i18n>
169169
$<$<NOT:$<BOOL:${MLN_USE_BUILTIN_ICU}>>:ICU::uc>
170-
$<$<BOOL:${MLN_USE_BUILTIN_ICU}>:mbgl-vendor-icu>
170+
$<$<BOOL:${MLN_USE_BUILTIN_ICU}>:$<IF:$<BOOL:${MLN_CORE_INCLUDE_DEPS}>,$<TARGET_OBJECTS:mbgl-vendor-icu>,mbgl-vendor-icu>>
171171
PNG::PNG
172172
mbgl-vendor-nunicode
173173
mbgl-vendor-sqlite

0 commit comments

Comments
 (0)