Skip to content

Commit

Permalink
use built-in find icu module
Browse files Browse the repository at this point in the history
  • Loading branch information
zerotacg committed Jul 14, 2024
1 parent 03d2c79 commit b9bee60
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,15 @@ IF(WITH_STATIC)
ENDIF()

# under Linux and OS X, recent libxml2 versions are linked against libicu
# FIND_PACKAGE(Icu)
FIND_LIBRARY(ICU_LIBRARY icuuc)
IF(ICU_LIBRARY)
FIND_LIBRARY(ICU_DATA_LIBRARY icudata)
IF(ICU_LIBRARY)
MESSAGE(STATUS "ICU UC was found: ${ICU_LIBRARY}")
ELSE()
MESSAGE(STATUS "ICU UC was NOT found")
ENDIF()
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICU_DATA_LIBRARY} ${ICU_LIBRARY})
FIND_PACKAGE(ICU COMPONENTS data uc)
IF(ICU_FOUND)
IF(ICU_UC_FOUND)
MESSAGE(STATUS "ICU uc was found: ${ICU_LIBRARIES}")
ENDIF()
IF(ICU_DATA_FOUND)
MESSAGE(STATUS "ICU data was found: ${ICU_LIBRARIES}")
ENDIF()
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ICU::data ICU::uc)
ENDIF()

ENDIF()
Expand Down

0 comments on commit b9bee60

Please sign in to comment.