Skip to content

Commit

Permalink
add support for symlinked install on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas authored and wjwwood committed Mar 26, 2015
1 parent 93de473 commit 3f22de3
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,19 @@ function(_ament_cmake_symlink_create_symlink absolute_file symlink)
file(REMOVE "${symlink}")
endif()

execute_process(
COMMAND "@CMAKE_COMMAND@" "-E" "create_symlink"
"${absolute_file}"
"${symlink}"
)
if(NOT WIN32)
execute_process(
COMMAND "@CMAKE_COMMAND@" "-E" "create_symlink"
"${absolute_file}"
"${symlink}"
)
else()
execute_process(
COMMAND "mklink"
"${symlink}"
"${absolute_file}"
)
endif()
# the CMake command does not provide a return code so check manually
if(NOT EXISTS "${symlink}" OR NOT IS_SYMLINK "${symlink}")
get_filename_component(destination "${symlink}" REALPATH)
Expand Down

0 comments on commit 3f22de3

Please sign in to comment.