find_package does not search for Config files in "lib" when CMAKE_FIND_ROOT_PATH is used
Hello,
not sure if this is a bug or a documentation issue:
I have a toolchain file that inherits from the CMAKE_SYSTEM_NAME Generic
file and sets a CMAKE_FIND_ROOT_PATH
.
In this root path all libraries are installed in [root_path]/lib
.
I have now the problem that find_package
does not consider the config files in [root_path]/lib/cmake
it only searches for them in [root_path]/usr/lib/cmake
. Though libraries that use Find-Modules are indeed found, so the lib
folder is considered just not for config files.
Can you tell me which variable I have to set to get rid of the usr
component?
I have CMAKE_SYSTEM_LIBRARY_PATH=/lib
set (actually the Generic toolchain already does this) but this does not alter this behaviour here.