Skip to content

Commit 69ff4f3

Browse files
authored
[fix](icu) Switch to static ICU library (#47984)
Problem Summary: 1. I have modified the ICU library in the project to use only static libraries.
1 parent 0c30f2c commit 69ff4f3

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

be/CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -206,24 +206,24 @@ set(Roaring_ROOT "$ENV{DORIS_THIRDPARTY}/installed")
206206
set(USE_STAT64 0)
207207

208208
set(ICU_ROOT "$ENV{DORIS_THIRDPARTY}/installed")
209-
find_package(ICU COMPONENTS uc i18n data)
210-
211-
if (ICU_FOUND)
212-
add_library(icu INTERFACE)
213-
209+
find_library(ICU_UC_LIBRARY NAMES libicuuc.a PATHS ${ICU_ROOT}/lib)
210+
find_library(ICU_I18N_LIBRARY NAMES libicui18n.a PATHS ${ICU_ROOT}/lib)
211+
find_library(ICU_DATA_LIBRARY NAMES libicudata.a PATHS ${ICU_ROOT}/lib)
212+
message("ICU_UC_LIBRARY: " ${ICU_UC_LIBRARY})
213+
message("ICU_I18N_LIBRARY: " ${ICU_I18N_LIBRARY})
214+
message("ICU_DATA_LIBRARY: " ${ICU_DATA_LIBRARY})
215+
if (ICU_UC_LIBRARY AND ICU_I18N_LIBRARY AND ICU_DATA_LIBRARY)
216+
add_library(icu INTERFACE IMPORTED)
214217
target_link_libraries(icu INTERFACE
215-
ICU::uc
216-
ICU::i18n
217-
ICU::data
218+
${ICU_UC_LIBRARY}
219+
${ICU_I18N_LIBRARY}
220+
${ICU_DATA_LIBRARY}
218221
)
219-
220222
set(COMMON_THIRDPARTY
221223
${COMMON_THIRDPARTY}
222224
icu
223225
)
224-
225226
add_definitions(-DUSE_ICU)
226-
227227
message(STATUS "ICU found and linked successfully!")
228228
else()
229229
message(WARNING "ICU not found! Please install ICU first.")

0 commit comments

Comments
 (0)