Skip to content

CMake policy and rules upgrade#8

Open
dfateyev wants to merge 2 commits into
halon:masterfrom
dfateyev:cmake-version-bump
Open

CMake policy and rules upgrade#8
dfateyev wants to merge 2 commits into
halon:masterfrom
dfateyev:cmake-version-bump

Conversation

@dfateyev

Copy link
Copy Markdown
Contributor
  • Bump CMake 3.5 policy version requirement >= 3.5
  • Upgrade package install rules to the modern standards

Modern environments should benefit from these changes.
Note, I didn't test these changes under BSD (only Linux), but see no evident regressions for it.

This PR addresses issue #7.

dfateyev added 2 commits July 12, 2026 03:06
CMake 4.0 dropped compatibility with policies older than 3.5, so
cmake_minimum_required(VERSION 2.6) no longer configures (FTBFS).
Raise the floor to 3.5 and use the range syntax to opt into modern
policy behavior without breaking older CMake.
Fedora is dropping the non-standard LIB_SUFFIX / LIB_INSTALL_DIR
variables from its %cmake macro (Changes/CMake_drop_install_vars),
which broke the install rules that hardcoded lib${LIB_SUFFIX}.
This change also should be useful for all modern Linux envs.

Include GNUInstallDirs and install to the standard
CMAKE_INSTALL_LIBDIR / CMAKE_INSTALL_INCLUDEDIR instead, so
the correct multilib path (e.g. lib64) is picked up automatically.

Drop the now unused LIB_INSTALL_DIR block and update
the pkg-config template to match.
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.

1 participant