Confg error due to duplicate `lib/` in the library path in cmake.
Description:
Since version glm 1.0.0-2, configuration with cmake doesn't work for linking. The error is
CMake Error at /usr/lib/cmake/glm/glmConfig.cmake:89 (message):
The imported target "glm::glm" references the file
"/usr/lib/lib/libglm.a"
The issue can be see in the installed configuration
cat /usr/lib/cmake/glm/glmConfig-release.cmake
...
set_target_properties(glm::glm PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libglm.a"
)
...
The _IMPORT_PREFIX
is /usr/lib
at this point.
Additional info:
- package version(s): glm 1.0.0-2 cmake 3.29.0-1
Steps to reproduce:
- Install glm and cmake
- Create a file called CMakeLists.txt with the following contents
cmake_minimum_required(VERSION 3.29)
project(repo)
find_package(glm)
- cd to the directory and run
cmake -S.
- cmake configuration can now be debugged using vscode, clion and probably the command line. I just peppered in a
message(${_IMPORT_PREFIX})
in/usr/lib/cmake/glm/glmConfig-release.cmake