LouisCharlesC / safe

Header only read/write wrapper to combine mutexes with locks.
MIT License
149 stars 11 forks source link

replace module_path with current_list_dir #22

Closed hellow554 closed 4 years ago

hellow554 commented 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 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.

LouisCharlesC commented 4 years ago

That looks absolutely correct, thanks!