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:

  1. Install glm and cmake
  2. Create a file called CMakeLists.txt with the following contents
cmake_minimum_required(VERSION 3.29)
project(repo)
find_package(glm)
  1. cd to the directory and run cmake -S.
  2. 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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information