Skip to content

CMake: Use GNUInstallDirs to support lib64 installation paths - #757

Open
maruixin-kls wants to merge 1 commit into
akheron:masterfrom
maruixin-kls:fix/cmake-lib64-support
Open

maruixin-kls wants to merge 1 commit into
akheron:masterfrom
maruixin-kls:fix/cmake-lib64-support

Conversation

@maruixin-kls

Copy link
Copy Markdown

This PR updates CMakeLists.txt to use the standard GNUInstallDirs module.

Previously, the library was hardcoded to install into lib, which causes issues on distributions that use lib64 for 64-bit libraries (e.g., Fedora, openSUSE, RHEL).

Changes:

  • Included GNUInstallDirs.
  • Replaced hardcoded lib paths with ${CMAKE_INSTALL_LIBDIR}.
  • Replaced hardcoded include paths with ${CMAKE_INSTALL_INCLUDEDIR} for consistency.

This ensures the library installs to the correct location according to the system's conventions.

Fixes #748

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.

A library installation directory of lib64 via -DJANSSON_INSTALL_LIB_DIR=lib64 is not handled properly.

1 participant