[CMake] Centos8 FindICU problems

Roger Leigh rleigh at codelibre.net
Wed Oct 23 15:35:19 EDT 2019


On 23/10/2019 14:43, Kent Williams wrote:
> That works for me, but is this a documented thing anywhere?
>
> On 10/22/19 4:22 PM, Roger Leigh wrote:
>> On 22/10/2019 21:51, Kent Williams wrote:
>>
>>> find_package(ICU REQUIRED)
>>>
>>> It reports failure to find ICU, and I can't work out what I'm 
>>> supposed to do:
>>>
>>>     CMake Error at 
>>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 
>>> (message):
>>>       Failed to find all ICU components (missing: ICU_LIBRARY) 
>>> (found version
>>>       "60.2")
>>>     Call Stack (most recent call first):
>>> /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 
>>> (_FPHSA_FAILURE_MESSAGE)
>>>       /usr/share/cmake/Modules/FindICU.cmake:317 
>>> (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
>>>       CMakeLists.txt:3 (find_package)
>>> Any suggestions?
>>
>> Hi Kent,
>>
>>
>> You need to specify the ICU libraries you want to link with as 
>> COMPONENTS.  E.g.
>>
>> find_package(ICU REQUIRED COMPONENTS data i18n io tu)
>>
>> If you don't specify any components, then it won't find any libraries 
>> at all and that will cause the check to fail which caused the above 
>> error.
>>
>>
>> Regards,
>>
>> Roger
>>
Hi Kent,

The components are all listed in the documentation: 
https://cmake.org/cmake/help/v3.16/module/FindICU.html

It doesn't directly say that you have to have at least one component, 
but since ICU is a collection of libraries it's implied that you need to 
specify the libraries you want. Not specifying any doesn't make sense 
since it's going to find nothing, and that's why it fails.


Regards,

Roger



More information about the CMake mailing list