Skip to content

Fix/install and cpm#87

Merged
baconpaul merged 3 commits intofree-audio:nextfrom
mthierman:fix/install_and_cpm
Sep 30, 2025
Merged

Fix/install and cpm#87
baconpaul merged 3 commits intofree-audio:nextfrom
mthierman:fix/install_and_cpm

Conversation

@mthierman
Copy link
Copy Markdown

@mthierman mthierman commented Sep 28, 2025

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 28, 2025

CLA assistant check
All committers have signed the CLA.

@mthierman
Copy link
Copy Markdown
Author

I've just noticed #83. I believe this is a better fix than setting more policies.

We should not remove this functionality, it's part of the CMake API now. I think it's safe to assume the person who initially committed this code is probably using it.

Comment thread CMakeLists.txt
cmake_minimum_required(VERSION 3.17)
cmake_policy(SET CMP0100 NEW) # handle .hh files
project(clap-helpers C CXX)
include(GNUInstallDirs)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this line do?

Copy link
Copy Markdown
Author

@mthierman mthierman Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://cmake.org/cmake/help/latest/command/install.html#signatures
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html#result-variables

It brings into scope the CMAKE_INSTALL_ variables

"To make packages compliant with distribution filesystem layout policies, if projects must specify a DESTINATION, it is strongly recommended that they use a path that begins with the appropriate relative GNUInstallDirs variable."

This solves the normalization problem, so we don't need to set a policy, fixing the warnings in newer versions of CMake. The destinations should remain the same.

@mthierman
Copy link
Copy Markdown
Author

I tested across OLD policy, NEW policy and this fix to confirm the paths remain the same before and after normalization.

@baconpaul
Copy link
Copy Markdown
Collaborator

Great. And I do have merge here. I will merge once CI passes.

Then we can update everything so we don't get the 0177 warning in all of surge land any more :)

@baconpaul baconpaul merged commit 7b6be40 into free-audio:next Sep 30, 2025
13 checks passed
abique added a commit that referenced this pull request Nov 28, 2025
* CPM: Update to 0.42.0 to fix CMP0169

* Install: Fix DESTINATION for install rules, to fix CMP0177

* Fix to keep include install directory the same as before
abique added a commit that referenced this pull request Nov 28, 2025
* CPM: Update to 0.42.0 to fix CMP0169

* Install: Fix DESTINATION for install rules, to fix CMP0177

* Fix to keep include install directory the same as before
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.

3 participants