diff --git a/CMakeLists.txt b/CMakeLists.txt index f8c48a83d..7f736e7b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -515,6 +515,7 @@ add_subdirectory(scripts) add_subdirectory(db) add_subdirectory(web) add_subdirectory(misc) +add_subdirectory(onvif) # Process distro subdirectories if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "f20")) diff --git a/onvif/CMakeLists.txt b/onvif/CMakeLists.txt new file mode 100644 index 000000000..e1ad01556 --- /dev/null +++ b/onvif/CMakeLists.txt @@ -0,0 +1,7 @@ +# CMakeLists.txt for the ZoneMinder ONVIF scripts + +# Process the perl modules subdirectory +add_subdirectory(proxy) +add_subdirectory(modules) +add_subdirectory(scripts) + diff --git a/onvif/modules/CMakeLists.txt b/onvif/modules/CMakeLists.txt new file mode 100644 index 000000000..5e3a878bb --- /dev/null +++ b/onvif/modules/CMakeLists.txt @@ -0,0 +1,10 @@ + + +# Add build target for the perl modules +add_custom_target(zmonvifmodules ALL perl Makefile.PL FIRST_MAKEFILE=MakefilePerl PREFIX="${CMAKE_CURRENT_BINARY_DIR}/output" LIB="${CMAKE_CURRENT_BINARY_DIR}/output/${ZM_PERL_SUBPREFIX}" INSTALLSITEMAN3DIR="${CMAKE_CURRENT_BINARY_DIR}/output/${CMAKE_INSTALL_MANDIR}/man3" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make --makefile=MakefilePerl COMMAND make --makefile=MakefilePerl pure_install COMMENT "Building ZoneMinder perl modules") + +# Add install target for the perl modules +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/" DESTINATION "${CMAKE_INSTALL_PREFIX}") + +# Add additional files and directories to make clean +set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "output;blib;pm_to_blib;MakefilePerl") diff --git a/onvif/proxy/CMakeLists.txt b/onvif/proxy/CMakeLists.txt new file mode 100644 index 000000000..fece81d11 --- /dev/null +++ b/onvif/proxy/CMakeLists.txt @@ -0,0 +1,10 @@ + + +# Add build target for the perl modules +add_custom_target(zmonvifproxy ALL perl Makefile.PL FIRST_MAKEFILE=MakefilePerl PREFIX="${CMAKE_CURRENT_BINARY_DIR}/output" LIB="${CMAKE_CURRENT_BINARY_DIR}/output/${ZM_PERL_SUBPREFIX}" INSTALLSITEMAN3DIR="${CMAKE_CURRENT_BINARY_DIR}/output/${CMAKE_INSTALL_MANDIR}/man3" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make --makefile=MakefilePerl COMMAND make --makefile=MakefilePerl pure_install COMMENT "Building ZoneMinder perl modules") + +# Add install target for the perl modules +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/" DESTINATION "${CMAKE_INSTALL_PREFIX}") + +# Add additional files and directories to make clean +set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "output;blib;pm_to_blib;MakefilePerl") diff --git a/onvif/scripts/CMakeLists.txt b/onvif/scripts/CMakeLists.txt new file mode 100644 index 000000000..09775b3f2 --- /dev/null +++ b/onvif/scripts/CMakeLists.txt @@ -0,0 +1,4 @@ +# CMakeLists.txt for the ZoneMinder perl scripts. + +# 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)