From 44a8656bd256373fe5927f49d41f5791c6538b86 Mon Sep 17 00:00:00 2001 From: Dennis Schridde Date: Sat, 15 Dec 2018 23:21:17 +0100 Subject: [PATCH] CMakeLists.txt: Respect DESTDIR when creating stransmit symlink Fixes: #357 --- CMakeLists.txt | 16 ++-------------- scripts/haiUtil.cmake | 5 ----- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb2582c..9202058 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -713,20 +713,8 @@ if ( ENABLE_CXX11 ) add_custom_command( TARGET srt-live-transmit POST_BUILD - COMMAND ${CMAKE_COMMAND} -E ${REPLI_COMMAND} $ ${stransmit_path}) - - if (SYMLINKABLE) - message(STATUS "BACKWARD COMPATIBLE 'stransmit': will use symbolic link") - srt_install_symlink(srt-live-transmit ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/stransmit) - elseif(${CMAKE_MAJOR_VERSION} LESS 3) - message(FATAL_ERROR "Your system can't install symbolic link to 'stransmit', copy-on-install requires cmake at least 3.0.2") - else() - # This installation doesn't work with cmake earlier than 3.0 - # (looxlike cmake 2.8 somehow doesn't have a problem with resolving the $ - # inside the generated makefile, but does have problem with its own generated cmake_install.cmake :D) - message(STATUS "BACKWARD COMPATIBLE 'stransmit': will use copying") - install(PROGRAMS ${stransmit_path} DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() + COMMAND ${CMAKE_COMMAND} -E ${REPLI_COMMAND} srt-live-transmit ${stransmit_path}) + install(FILES ${stransmit_path} DESTINATION ${CMAKE_INSTALL_BINDIR}) srt_add_application(srt-file-transmit ${VIRTUAL_srtsupport}) diff --git a/scripts/haiUtil.cmake b/scripts/haiUtil.cmake index 417128d..f60bc11 100644 --- a/scripts/haiUtil.cmake +++ b/scripts/haiUtil.cmake @@ -48,5 +48,0 @@ FUNCTION(join_arguments outvar) -macro(srt_install_symlink filepath sympath) - install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${filepath} ${sympath})") - install(CODE "message(\"-- Created symlink: ${sympath} -> ${filepath}\")") -endmacro(srt_install_symlink) - -- 2.20.0