From 5c77b632e518a7dc61e9dbaa326e1342d832bb24 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Sun, 12 Jun 2022 22:28:22 -0700 Subject: [PATCH] Tick-tock ign executable with symlinks Signed-off-by: methylDragon --- src/CMakeLists.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 927fdee..a900b4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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() #===============================================================================