I'm new to Cmake and trying to build a KDE project (okular) which requires an optional package(libspectre). I did a default make install and the library files are in the location "/usr/lib/x86_64-linux-gnu".
In the generators/CMakeLists.txt, I tried to replace the "macro_optional_find_package(LibSpectre)" with the following:
find_library(LIBSPECTRE_LIBRARY NAMES libspectre PATHS "/usr/lib/x86_64-linux-gnu/")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibSpectre DEFAULT_MSG LIBSPECTRE_LIBRARY)
Which seems to not find the libspectre library. I tried replacing PATHS with HINTS and also changing 'libspectre' to 'spectre' after NAMES. But it doesn't seem to recognize.
Any help is appreciated!
/usr/lib/x86_64-linux-gnu/) which you want to find? Are you sure, that givenfind_library()call is executed? (Try to addmessage()call after it). As you build project for yourself, it is better just to setLIBSPECTRE_LIBRARYvariable in CMake cache. No needs to modify scripts for that. - Tsyvarev