comparison Resources/CMake/LibIcuConfiguration.cmake @ 3230:4b042ec734c1

dynamic linking against libicu
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 14 Feb 2019 20:22:33 +0100
parents 4b9cfd92d1ae
children fc5bc0fe863c
comparison
equal deleted inserted replaced
3229:77e8378f0323 3230:4b042ec734c1
71 CHECK_INCLUDE_FILE_CXX(unicode/uvernum.h HAVE_ICU_H) 71 CHECK_INCLUDE_FILE_CXX(unicode/uvernum.h HAVE_ICU_H)
72 if (NOT HAVE_ICU_H) 72 if (NOT HAVE_ICU_H)
73 message(FATAL_ERROR "Please install the libicu-dev package") 73 message(FATAL_ERROR "Please install the libicu-dev package")
74 endif() 74 endif()
75 75
76 CHECK_LIBRARY_EXISTS(icuuc udata_close "" HAVE_ICU_LIB) 76 find_library(LIBICU_PATH_1 NAMES icuuc)
77 if (NOT HAVE_ICU_LIB) 77 find_library(LIBICU_PATH_2 NAMES icui18n)
78 #message(FATAL_ERROR "Please install the libicu-dev package") 78
79 link_libraries(icuuc) 79 if (NOT LIBICU_PATH_1 OR
80 NOT LIBICU_PATH_2)
81 message(FATAL_ERROR "Please install the libicu-dev package")
80 else() 82 else()
81 link_libraries(icuuc) 83 link_libraries(icuuc icui18n)
82 endif() 84 endif()
83 endif() 85 endif()