cmake: MacOS - detect ICU link directory (required by Boost.Locale)

This commit is contained in:
xiphon 2020-12-20 20:00:23 +00:00 committed by GitHub
parent fed00a5662
commit 772b828b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,6 +137,14 @@ target_compile_definitions(monero-wallet-gui
${Qt5Qml_DEFINITIONS}
)
if(APPLE)
if(NOT ICU_ROOT)
execute_process(COMMAND brew --prefix icu4c OUTPUT_VARIABLE ICU_ROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
find_package(ICU REQUIRED COMPONENTS data i18n uc)
target_link_directories(monero-wallet-gui PRIVATE ${ICU_ROOT}/lib)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
target_link_libraries(monero-wallet-gui