File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1067,7 +1067,19 @@ if(MINGW)
10671067 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj" )
10681068 set (EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
10691069 if (NOT DEPENDS )
1070- set (ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
1070+ # This is an extremely ugly hack to get around Boost not being built with static ICU.
1071+ # We reported the issue, we are waiting for upstream to fix this issue: https://github.com/boostorg/boost/issues/1079#issue-3384962885
1072+ # This hack links shared ICU libs to avoid linker errors we get in MSYS2 compilation (undefined symbols to ICU).
1073+ set (OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} )
1074+ set (CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" )
1075+ find_library (ICUIO_LIBRARIES NAMES icuio REQUIRED)
1076+ find_library (ICUIN_LIBRARIES NAMES icuin REQUIRED)
1077+ find_library (ICUUC_LIBRARIES NAMES icuuc REQUIRED)
1078+ find_library (ICUDT_LIBRARIES NAMES icudt REQUIRED)
1079+ find_library (ICUTU_LIBRARIES NAMES icutu REQUIRED)
1080+ find_library (ICONV_LIBRARIES NAMES iconv REQUIRED)
1081+ set (ICU_LIBRARIES ${ICUIO_LIBRARIES} ${ICUIN_LIBRARIES} ${ICUUC_LIBRARIES} ${ICUDT_LIBRARIES} ${ICUTU_LIBRARIES} ${ICONV_LIBRARIES} )
1082+ set (CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES} )
10711083 endif ()
10721084elseif (APPLE OR OPENBSD OR ANDROID)
10731085 set (EXTRA_LIBRARIES "" )
You can’t perform that action at this time.
0 commit comments