-
-
Notifications
You must be signed in to change notification settings - Fork 639
Open
Labels
Description
Describe the issue
As per title: tinyobjloader.pc.in has
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@TINYOBJLOADER_LIBRARY_DIR@
includedir=${prefix}/@TINYOBJLOADER_INCLUDE_DIR@
where TINYOBJLOADER_{LIBRARY,INCLUDE}_DIR is set in CMakeLists.txt to the value of CMAKE_INSTALL_{LIB,INCLUDE}DIR, so it is unable to handle absolute paths being passed in the latter (unusual but valid per documentation of GNUInstallDirs). This leads to broken .pc files on NixOS in particular.
See “Concatenating paths when building pkg-config files” for a thorough discussion of the problem and a suggested fix, or KDE’s extra-cmake-modules for a simpler approach.
Environment
- TinyObjLoader version: 1.0.7 (inspection confirms issue exists on master as well)
- OS:
Linux localhost 5.15.36 #1-NixOS SMP Wed Apr 27 12:39:02 UTC 2022 x86_64 GNU/Linux - Compiler: CMake 3.22.3, GCC 11.2.0, GNU binutils 2.38