Skip to content

Commit

Permalink
Fix for CMake 3.31 warning CMP0177 (#1309)
Browse files Browse the repository at this point in the history
Normalizing the include file path before calling install

Fixes #1308
  • Loading branch information
jrouwe authored Oct 25, 2024
1 parent 9fb538e commit da2d6cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ if (ENABLE_INSTALL)
string(REPLACE ${PHYSICS_REPO_ROOT} "" RELATIVE_SRC_FILE ${SRC_FILE})
get_filename_component(DESTINATION_PATH ${RELATIVE_SRC_FILE} DIRECTORY)
if (NOT RELATIVE_SRC_FILE MATCHES "\.cpp")
install(FILES ${SRC_FILE} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${DESTINATION_PATH})
cmake_path(SET DST_FILE NORMALIZE "${CMAKE_INSTALL_INCLUDEDIR}/${DESTINATION_PATH}")
install(FILES ${SRC_FILE} DESTINATION ${DST_FILE})
endif()
endforeach()

Expand Down

0 comments on commit da2d6cb

Please sign in to comment.