Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute #336

Copy link
Copy link
@alexshpilkin

Description

@alexshpilkin
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.