Fix/install and cpm#87
Conversation
|
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. |
| cmake_minimum_required(VERSION 3.17) | ||
| cmake_policy(SET CMP0100 NEW) # handle .hh files | ||
| project(clap-helpers C CXX) | ||
| include(GNUInstallDirs) |
There was a problem hiding this comment.
What does this line do?
There was a problem hiding this comment.
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.
|
I tested across OLD policy, NEW policy and this fix to confirm the paths remain the same before and after normalization. |
|
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 :) |
* 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
* 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
This fixes https://cmake.org/cmake/help/latest/policy/CMP0177.html and https://cmake.org/cmake/help/latest/policy/CMP0169.html