Skip to content

Commit

Permalink
Tick-tock ign executable with symlinks
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Jun 13, 2022
1 parent 44f60f6 commit 5c77b63
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,26 @@ if(WIN32)
# On Windows also install the executable as gz
# to permit to invoke gz via Git Bash
# see https://github.com/gazebosim/gz-tools/issues/70
install (PROGRAMS ${gz_script_generated} DESTINATION ${BIN_INSTALL_DIR} RENAME gz)
install(PROGRAMS ${gz_script_generated} DESTINATION ${BIN_INSTALL_DIR} RENAME gz)

# On Windows also install the gz.bat wrapper script to permit to
# invoke gz via Command Prompt or Powershell
install (PROGRAMS gz.bat DESTINATION ${BIN_INSTALL_DIR})
install(PROGRAMS gz.bat DESTINATION ${BIN_INSTALL_DIR})

# TODO(CH3): Deprecated. Tick-tock the ign executable
# This is exceptionally scuffed
install(PROGRAMS ${ign_script_generated} DESTINATION ${BIN_INSTALL_DIR} RENAME ign)
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}/gz.bat
${PROJECT_BINARY_DIR}/ign.bat)")
install(PROGRAMS ${PROJECT_BINARY_DIR}/ign.bat DESTINATION ${BIN_INSTALL_DIR})
else()
# TODO(CH3): Deprecated. Tick-tock the ign executable with symlink
# This is exceptionally scuffed
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}/gz
${PROJECT_BINARY_DIR}/ign)")
install(PROGRAMS ${PROJECT_BINARY_DIR}/ign DESTINATION ${BIN_INSTALL_DIR})
endif()

#===============================================================================
Expand Down

0 comments on commit 5c77b63

Please sign in to comment.