Title: pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute · Issue #336 · tinyobjloader/tinyobjloader · GitHub
Open Graph Title: pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute · Issue #336 · tinyobjloader/tinyobjloader
X Title: pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute · Issue #336 · tinyobjloader/tinyobjloader
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,INCLU...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/tinyobjloader/tinyobjloader/issues/336
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pkg-config file is broken when CMAKE_INSTALL_{INCLUDE,LIB}DIR is absolute","articleBody":"**Describe the issue**\r\n\r\nAs per title: `tinyobjloader.pc.in` has\r\n```\r\nprefix=@CMAKE_INSTALL_PREFIX@\r\nexec_prefix=${prefix}\r\nlibdir=${prefix}/@TINYOBJLOADER_LIBRARY_DIR@\r\nincludedir=${prefix}/@TINYOBJLOADER_INCLUDE_DIR@\r\n```\r\nwhere `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](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html#result-variables)). This leads to broken .pc files on NixOS in particular.\r\n\r\nSee “[Concatenating paths when building pkg-config files](https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files)” for a thorough discussion of the problem and a suggested fix, or [KDE’s extra-cmake-modules](https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/modules/ECMGeneratePkgConfigFile.cmake#L166) for a simpler approach.\r\n\r\n**Environment**\r\n - TinyObjLoader version: 1.0.7 (inspection confirms issue exists on master as well)\r\n - OS: `Linux localhost 5.15.36 #1-NixOS SMP Wed Apr 27 12:39:02 UTC 2022 x86_64 GNU/Linux`\r\n - Compiler: CMake 3.22.3, GCC 11.2.0, GNU binutils 2.38","author":{"url":"https://github.com/alexshpilkin","@type":"Person","name":"alexshpilkin"},"datePublished":"2022-05-18T20:57:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/336/tinyobjloader/issues/336"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f804e22d-fe6f-0b22-7915-07c8476c017b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEE2:1A99C4:9AB41D:D701AC:6965000C |
| html-safe-nonce | 8de4cd2e972ccd7006ccc0cacd821e6dab17b0c9b6e03fb18579e89e302d0015 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUUyOjFBOTlDNDo5QUI0MUQ6RDcwMUFDOjY5NjUwMDBDIiwidmlzaXRvcl9pZCI6IjcxNjA5NzYzNTcwOTEyNDYwOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c854780db495157b7b9fe1db7f59d22f3b4578dfe3ec19caf9be2eef4629ee16 |
| hovercard-subject-tag | issue:1240517748 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/tinyobjloader/tinyobjloader/336/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50fad088cf8b20f9e44853be996146dc1f53c657d814228d1a7891a4605ac063/tinyobjloader/tinyobjloader/issues/336 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50fad088cf8b20f9e44853be996146dc1f53c657d814228d1a7891a4605ac063/tinyobjloader/tinyobjloader/issues/336 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alexshpilkin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 409eef8307c7b2774ef22b51d9c9bea7aae00b7c42378f10825b0de95e35b3d8 |
| turbo-cache-control | no-preview |
| go-import | github.com/tinyobjloader/tinyobjloader git https://github.com/tinyobjloader/tinyobjloader.git |
| octolytics-dimension-user_id | 61176939 |
| octolytics-dimension-user_login | tinyobjloader |
| octolytics-dimension-repository_id | 5421296 |
| octolytics-dimension-repository_nwo | tinyobjloader/tinyobjloader |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 5421296 |
| octolytics-dimension-repository_network_root_nwo | tinyobjloader/tinyobjloader |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0f2726e2829a4524ee45b32f55dabe51189d33b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width