Skip to content

Commit 292df83

Browse files
committed
Link to the ICU61 libraries that are built for Linux
- The findICU was not finding the libicu{uc,i18n}swift libraries so libFoundation.so was still being linked to the system ICU libraries.
1 parent b4a318a commit 292df83

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

CMakeLists.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,27 @@ option(FOUNDATION_PATH_TO_LIBDISPATCH_BUILD "Path to libdispatch build" "")
1717
option(FOUNDATION_PATH_TO_XCTEST_BUILD "Path to XCTest build" "")
1818

1919
find_package(CURL REQUIRED)
20+
21+
# When using find_package for ICU, if ICU is custom built then ICU_{UC,I18N_LIBRARY_{DEBUG,RELEASE}
22+
# also need to be set.
23+
if(NOT "${ICU_UC_LIBRARY}" STREQUAL "")
24+
if("${ICU_UC_LIBRARY_DEBUG}" STREQUAL "")
25+
set(ICU_UC_LIBRARY_DEBUG "${ICU_UC_LIBRARY}")
26+
endif()
27+
if("${ICU_UC_LIBRARY_RELEASE}" STREQUAL "")
28+
set(ICU_UC_LIBRARY_RELEASE "${ICU_UC_LIBRARY}")
29+
endif()
30+
endif()
31+
32+
if(NOT "${ICU_I18N_LIBRARY}" STREQUAL "")
33+
if("${ICU_I18N_LIBRARY_DEBUG}" STREQUAL "")
34+
set(ICU_I18N_LIBRARY_DEBUG "${ICU_I18N_LIBRARY}")
35+
endif()
36+
if("${ICU_I18N_LIBRARY_RELEASE}" STREQUAL "")
37+
set(ICU_I18N_LIBRARY_RELEASE "${ICU_I18N_LIBRARY}")
38+
endif()
39+
endif()
40+
2041
find_package(ICU COMPONENTS uc i18n REQUIRED)
2142
find_package(LibXml2 REQUIRED)
2243

0 commit comments

Comments
 (0)