diff options
| author | 0xFFFC0000 <0xFFFC0000@proton.me> | 2025-09-07 19:19:28 +0000 |
|---|---|---|
| committer | 0xFFFC0000 <0xFFFC0000@proton.me> | 2025-09-08 17:38:04 +0100 |
| commit | 53375a79ce719345399bcd908ee76897f0daadac (patch) | |
| tree | d864741cc96d69ac392c19297361cf97528049bf /CMakeLists.txt | |
| parent | 81f948a4a1b2ab9314399f6fd82405aefd1b97a5 (diff) | |
| download | monzero-core-53375a79ce719345399bcd908ee76897f0daadac.tar.gz monzero-core-53375a79ce719345399bcd908ee76897f0daadac.tar.xz monzero-core-53375a79ce719345399bcd908ee76897f0daadac.zip | |
CMake: fix msys/ICU compilation failure
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 46bd5eb1b..9b922046e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1115,7 +1115,19 @@ if(MINGW) if(DEPENDS) set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv) else() - set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv) + # This is an extremely ugly hack to get around Boost not being built with static ICU. + # We reported the issue, we are waiting for upstream to fix this issue: https://github.com/boostorg/boost/issues/1079#issue-3384962885 + # This hack links shared ICU libs to avoid linker errors we get in MSYS2 compilation (undefined symbols to ICU). + set(OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a") + find_library(ICUIO_LIBRARIES NAMES icuio REQUIRED) + find_library(ICUIN_LIBRARIES NAMES icuin REQUIRED) + find_library(ICUUC_LIBRARIES NAMES icuuc REQUIRED) + find_library(ICUDT_LIBRARIES NAMES icudt REQUIRED) + find_library(ICUTU_LIBRARIES NAMES icutu REQUIRED) + find_library(ICONV_LIBRARIES NAMES iconv REQUIRED) + set(ICU_LIBRARIES ${ICUIO_LIBRARIES} ${ICUIN_LIBRARIES} ${ICUUC_LIBRARIES} ${ICUDT_LIBRARIES} ${ICUTU_LIBRARIES} ${ICONV_LIBRARIES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES}) endif() elseif(APPLE OR OPENBSD OR ANDROID) set(EXTRA_LIBRARIES "") |
