Ajude-me, por favor. Eu gostaria de adicionar a biblioteca ICU ao meu projeto. Minha versão do cmake é 2.8.12.2.
Existe CMakeLists.txt
cmake_minimum_required (VERSÃO 2.8)
projeto (teste1)
conjunto (CMAKE_MODULE_PATH $ {PROJECT_SOURCE_DIR})
conjunto (CMAKE_CXX_COMPILER / usr / bin / g ++)
conjunto (CMAKE_CXX_FLAGS "$ {CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI = 0 -std = c ++ 11 -Wall"find_package (Boost 1.54.0 COMPONENTES sistema de arquivos regex unit_test_framework REQUIRED)
find_package (ICU 52.0 REQUIRED)include_directories ($ {Boost_INCLUDE_DIR})
link_directories ($ {Boost_LIBRARY_DIR})add_executable (test1 src / dictionary.cpp src / main.cpp)
target_link_libraries (test1 $ {Boost_LIBRARIES} pthread)
Eu instalei as bibliotecas ICU: libicu-dev, libicu-dev: i386, libicu52, libicu52: i386, libicu52-dbg: i386
Mas assim que executo o CMake, recebo a seguinte mensagem de erro:
CMake Error at CMakeLists.txt:10 (find_package):
By not providing "FindICU.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "ICU", but
CMake did not find one.
Could not find a package configuration file provided by "ICU" (requested
version 52.1) with any of the following names:
ICUConfig.cmake
icu-config.cmake
Add the installation prefix of "ICU" to CMAKE_PREFIX_PATH or set "ICU_DIR"
to a directory containing one of the above files. If "ICU" provides a
separate development package or SDK, be sure it has been installed.
O que devo fazer? Ajude-me, por favor.
Este problema foi resolvido adicionando o arquivo FindICU.cmake no topo do diretório do projeto em http://github.com/julp/FindICU.cmake
Este artigo é coletado da Internet.
Se houver alguma infração, entre em [email protected] Delete.
deixe-me dizer algumas palavras