Skip to content

Commit

Permalink
Fix how ign compatibility files are copied in windows (#419)
Browse files Browse the repository at this point in the history
Instead of relying on the installed `gz` cmake file, we copy
the one from the source directory. This avoids relying on an absolute path
formed using `CMAKE_INSTALL_PREFIX`, which doesn't work well when using
`CMAKE_STAGING_PREFIX`.

Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey authored Mar 29, 2024
1 parent 459ea34 commit 290b368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ foreach(cmake_file ${tick_tocked_cmake_files})

if (WIN32) # Windows requires copy instead of symlink
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy \
${CMAKE_INSTALL_PREFIX}\/${gz_modules_install_dir}\/${cmake_file} \
${PROJECT_SOURCE_DIR}\/cmake/${cmake_file} \
${PROJECT_BINARY_DIR}\/cmake/${ign_cmake_file})")
else()
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
Expand Down

0 comments on commit 290b368

Please sign in to comment.