Home > Software design >  Install ICU libraries for CMake
Install ICU libraries for CMake

Time:01-27

I am trying to build one windows library with CMake:

The following ICU libraries were not found:
  uc (required)
  i18n (required)
  data (required)
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Failed to find all ICU components (missing: ICU_LIBRARY
  _ICU_REQUIRED_LIBS_FOUND) (found version "72.1")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.25/Modules/FindICU.cmake:333 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/MapnikFindPackage.cmake:20 (find_package)
  CMakeLists.txt:155 (mapnik_find_package)

I've downloaded release from here: https://github.com/unicode-org/icu/releases/download/release-72-1/icu4c-72_1-Win64-MSVC2019.zip

and unpack it to the c:\icu.

How can I tell CMake where to find ICU binaries?

CodePudding user response:

The rule of thumb is to set CMAKE_PREFIX_PATH with semi-colon separated list of install paths of external libraries: https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html

  • Related