Skip to content

Commit

Permalink
install: add normalization step for install_path
Browse files Browse the repository at this point in the history
Related to new CMake policy 0177 since CMake >= 3.31. See https://cmake.org/cmake/help/latest/policy/CMP0177.html
  • Loading branch information
jcarpent committed Dec 15, 2024
1 parent 29c0eb4 commit 1e4c7c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions header.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2008-2019 LAAS-CNRS, JRL AIST-CNRS, INRIA.
# Copyright (C) 2008-2024 LAAS-CNRS, JRL AIST-CNRS, INRIA.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
Expand Down Expand Up @@ -316,9 +316,10 @@ macro(HEADER_INSTALL)
string(REGEX REPLACE "${CMAKE_BINARY_DIR}" "" DIR "${DIR}")
string(REGEX REPLACE "${PROJECT_SOURCE_DIR}" "" DIR "${DIR}")
string(REGEX REPLACE "include(/|$)" "" DIR "${DIR}")
cmake_path(SET INSTALL_PATH NORMALIZE "${CMAKE_INSTALL_INCLUDEDIR}/${DIR}")
install(
FILES ${FILE}
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${DIR}"
DESTINATION ${INSTALL_PATH}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE
COMPONENT ${_COMPONENT_NAME}
)
Expand Down

0 comments on commit 1e4c7c7

Please sign in to comment.