Closed hellow554 closed 4 years ago
https://github.com/LouisCharlesC/safe/blob/2f24b6f1b4a4467abb68458deb77e82835ce5f92/cmake/InstallTarget.cmake#L7-L11
This uses ${CMAKE_MODULE_PATH} which contains in my case a semicolon seperated list of files, and this seems to be correct.
${CMAKE_MODULE_PATH}
| CMake Error: File /build/tmp/work/cortexa7t2hf-neon-vfpv4-linux-gnueabi/safe/1.0.1-r0/recipe-sysroot/usr/share/cmake/Modules/;/build/tmp/work/cortexa7t2hf-neon-vfpv4-linux-gnueabi/safe/1.0.1-r0/recipe-sysroot/usr/share/cmake/Modules/;/build/tmp/work/cortexa7t2hf-neon-vfpv4-linux-gnueabi/safe/1.0.1-r0/git/cmake/safeConfig.cmake.in does not exist. | CMake Error at /build/tmp/work/cortexa7t2hf-neon-vfpv4-linux-gnueabi/safe/1.0.1-r0/recipe-sysroot-native/usr/share/cmake-3.15/Modules/CMakePackageConfigHelpers.cmake:330 (configure_file): | configure_file Problem configuring file | Call Stack (most recent call first): | cmake/InstallTarget.cmake:7 (configure_package_config_file) | CMakeLists.txt:17 (include)
Using CMAKE_CURRENT_LIST_DIR fixes it, because that variable contains the cmake subfolder which also contains the safeConfig.cmake.in file.
CMAKE_CURRENT_LIST_DIR
cmake
safeConfig.cmake.in
That looks absolutely correct, thanks!
https://github.com/LouisCharlesC/safe/blob/2f24b6f1b4a4467abb68458deb77e82835ce5f92/cmake/InstallTarget.cmake#L7-L11
This uses
${CMAKE_MODULE_PATH}
which contains in my case a semicolon seperated list of files, and this seems to be correct.Using
CMAKE_CURRENT_LIST_DIR
fixes it, because that variable contains thecmake
subfolder which also contains thesafeConfig.cmake.in
file.