diff options
-rw-r--r-- | src/gui/curses/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/gui/curses/Makefile.am | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt index 994b9bc8c..62cc9a4d4 100644 --- a/src/gui/curses/CMakeLists.txt +++ b/src/gui/curses/CMakeLists.txt @@ -81,5 +81,10 @@ INSTALL(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin) # Create a symbolic link weechat-curses -> weechat # This link is created for compatibility with old versions on /upgrade. # It may be removed in future. -INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove -f \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/weechat-curses${CMAKE_EXECUTABLE_SUFFIX}\")") -INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink weechat \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/weechat-curses${CMAKE_EXECUTABLE_SUFFIX}\")") +INSTALL(CODE " + EXECUTE_PROCESS( + COMMAND \${CMAKE_COMMAND} -E remove -f \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/weechat-curses\${CMAKE_EXECUTABLE_SUFFIX}\" + COMMAND \${CMAKE_COMMAND} -E create_symlink weechat \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/weechat-curses\${CMAKE_EXECUTABLE_SUFFIX}\" + ) + LIST(APPEND CMAKE_INSTALL_MANIFEST_FILES \"\${CMAKE_INSTALL_PREFIX}/bin/weechat-curses\${CMAKE_EXECUTABLE_SUFFIX}\") +") diff --git a/src/gui/curses/Makefile.am b/src/gui/curses/Makefile.am index 78cff7f67..811cdc626 100644 --- a/src/gui/curses/Makefile.am +++ b/src/gui/curses/Makefile.am @@ -50,4 +50,8 @@ EXTRA_DIST = CMakeLists.txt # This link is created for compatibility with old versions on /upgrade. # It may be removed in future. install-exec-hook: - (cd $(DESTDIR)$(bindir) && rm -f weechat-curses$(EXEEXT) && $(LN_S) weechat weechat-curses$(EXEEXT)) + (cd '$(DESTDIR)$(bindir)' && rm -f weechat-curses$(EXEEXT) && $(LN_S) weechat weechat-curses$(EXEEXT)) + +# Remove symbolic link on uninstall +uninstall-hook: + (cd '$(DESTDIR)$(bindir)' && rm -f weechat-curses$(EXEEXT)) |