From 37c7b71b03672757d7a2bb55475cc1c31e016b1c Mon Sep 17 00:00:00 2001 From: Andy Bauer Date: Sat, 13 Feb 2016 15:26:31 -0600 Subject: [PATCH] add out-of-source build support to onvif/scripts folder --- onvif/scripts/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/onvif/scripts/CMakeLists.txt b/onvif/scripts/CMakeLists.txt index 09775b3f2..3405fa756 100644 --- a/onvif/scripts/CMakeLists.txt +++ b/onvif/scripts/CMakeLists.txt @@ -1,4 +1,9 @@ # CMakeLists.txt for the ZoneMinder perl scripts. +# If this is an out-of-source build, copy the files we need to the binary directory +if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) + file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/zmonvif-probe.pl" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") +endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) + # Install the perl scripts install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmonvif-probe.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)