Lines 705-732
if ( ENABLE_CXX11 )
Link Here
|
705 |
# For backward compatibility with the old name |
705 |
# For backward compatibility with the old name |
706 |
if (SYMLINKABLE) |
706 |
if (SYMLINKABLE) |
707 |
set (REPLI_COMMAND create_symlink ) |
707 |
set (REPLI_COMMAND create_symlink ) |
|
|
708 |
# It appears impossible to get the filename component from the generator |
709 |
# expression $<TARGET_FILE:srt-live-transmit>, hence we predict it as: |
710 |
set (srt_live_transmit_name srt-live-transmit${CMAKE_EXECUTABLE_SUFFIX}) |
708 |
else() |
711 |
else() |
709 |
set (REPLI_COMMAND copy) |
712 |
set (REPLI_COMMAND copy) |
|
|
713 |
set (srt_live_transmit_name $<TARGET_FILE:srt-live-transmit>) |
710 |
endif() |
714 |
endif() |
711 |
|
715 |
|
712 |
set (stransmit_path $<TARGET_FILE_DIR:srt-live-transmit>/stransmit${CMAKE_EXECUTABLE_SUFFIX}) |
716 |
set (stransmit_path $<TARGET_FILE_DIR:srt-live-transmit>/stransmit${CMAKE_EXECUTABLE_SUFFIX}) |
713 |
add_custom_command( |
717 |
add_custom_command( |
714 |
TARGET srt-live-transmit |
718 |
TARGET srt-live-transmit |
715 |
POST_BUILD |
719 |
POST_BUILD |
716 |
COMMAND ${CMAKE_COMMAND} -E ${REPLI_COMMAND} $<TARGET_FILE:srt-live-transmit> ${stransmit_path}) |
720 |
COMMAND ${CMAKE_COMMAND} -E ${REPLI_COMMAND} ${srt_live_transmit_name} ${stransmit_path}) |
717 |
|
721 |
install(FILES ${stransmit_path} DESTINATION ${CMAKE_INSTALL_BINDIR}) |
718 |
if (SYMLINKABLE) |
|
|
719 |
message(STATUS "BACKWARD COMPATIBLE 'stransmit': will use symbolic link") |
720 |
srt_install_symlink(srt-live-transmit ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/stransmit) |
721 |
elseif(${CMAKE_MAJOR_VERSION} LESS 3) |
722 |
message(FATAL_ERROR "Your system can't install symbolic link to 'stransmit', copy-on-install requires cmake at least 3.0.2") |
723 |
else() |
724 |
# This installation doesn't work with cmake earlier than 3.0 |
725 |
# (looxlike cmake 2.8 somehow doesn't have a problem with resolving the $<TARGET_FILE_DIR:...> |
726 |
# inside the generated makefile, but does have problem with its own generated cmake_install.cmake :D) |
727 |
message(STATUS "BACKWARD COMPATIBLE 'stransmit': will use copying") |
728 |
install(PROGRAMS ${stransmit_path} DESTINATION ${CMAKE_INSTALL_BINDIR}) |
729 |
endif() |
730 |
|
722 |
|
731 |
srt_add_application(srt-file-transmit ${VIRTUAL_srtsupport}) |
723 |
srt_add_application(srt-file-transmit ${VIRTUAL_srtsupport}) |
732 |
|
724 |
|