Skip to content

[WIP] Issue #631 — respecting CMake's CMAKE_INSTALL_PREFIX for installation#659

Draft
leftibot wants to merge 1 commit intoChaiScript:developfrom
leftibot:fix/issue-631-respecting-cmake-s-cmake-install-prefix-
Draft

[WIP] Issue #631 — respecting CMake's CMAKE_INSTALL_PREFIX for installation#659
leftibot wants to merge 1 commit intoChaiScript:developfrom
leftibot:fix/issue-631-respecting-cmake-s-cmake-install-prefix-

Conversation

@leftibot
Copy link
Copy Markdown
Contributor

Automated attempt by @leftibot. Opening as draft — verification failed.

Reason: no test files were detected in the diff

What changed

Fix #631: Respect CMAKE_INSTALL_PREFIX and use GNUInstallDirs for install paths
The CMakeLists.txt used CMAKE_INSTALL_LIBDIR in install destinations without
including the GNUInstallDirs module, leaving the variable empty. This caused
libraries to install to absolute paths like /chaiscript instead of lib/chaiscript,
and the pkg-config file to install to /pkgconfig instead of lib/pkgconfig. The
chaiscript.pc.in template also hardcoded "lib" and "include" instead of using
the CMake variables. Added include(GNUInstallDirs) and updated the .pc.in
template to use @CMAKE_INSTALL_LIBDIR@ and @CMAKE_INSTALL_INCLUDEDIR@.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

Files

 CMakeLists.txt                     |  9 ++++++++-
 cmake/check_pkgconfig.cmake        | 32 ++++++++++++++++++++++++++++++++
 contrib/pkgconfig/chaiscript.pc.in |  4 ++--
 3 files changed, 42 insertions(+), 3 deletions(-)

Will close #631 once finalized.

Triggered by @lefticus.

…rs for install paths

The CMakeLists.txt used CMAKE_INSTALL_LIBDIR in install destinations without
including the GNUInstallDirs module, leaving the variable empty. This caused
libraries to install to absolute paths like /chaiscript instead of lib/chaiscript,
and the pkg-config file to install to /pkgconfig instead of lib/pkgconfig. The
chaiscript.pc.in template also hardcoded "lib" and "include" instead of using
the CMake variables. Added include(GNUInstallDirs) and updated the .pc.in
template to use @CMAKE_INSTALL_LIBDIR@ and @CMAKE_INSTALL_INCLUDEDIR@.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

respecting CMake's CMAKE_INSTALL_PREFIX for installation

1 participant