Skip to content

Commit

Permalink
[build] install scripts/srt-ffplay in the bin directory
Browse files Browse the repository at this point in the history
We don't need to use CMAKE_INSTALL_BINDIR which is not defined when
GNUInstallDirs is not used. Using "TYPE BIN" will have the same result
and will automatically pick the same as CMAKE_INSTALL_BINDIR.

https://cmake.org/cmake/help/latest/command/install.html#installing-files
  • Loading branch information
robUx4 authored and maxsharabayko committed Sep 9, 2022
1 parent ea84103 commit 3170590
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,13 @@ if (ENABLE_UNITTESTS AND ENABLE_CXX11)
endif()


install(PROGRAMS scripts/srt-ffplay DESTINATION ${CMAKE_INSTALL_BINDIR})
if(NOT NEED_DESTINATION)
install(PROGRAMS scripts/srt-ffplay TYPE BIN)
elseif (DEFINED CMAKE_INSTALL_BINDIR)
install(PROGRAMS scripts/srt-ffplay DESTINATION ${CMAKE_INSTALL_BINDIR})
else()
message(WARNING "No location to install scripts/srt-ffplay")
endif()


if (DEFINED SRT_EXTRA_APPS_INC)
Expand Down

0 comments on commit 3170590

Please sign in to comment.