Skip to content

Commit

Permalink
CMake support for onvif modules
Browse files Browse the repository at this point in the history
  • Loading branch information
altaroca committed Jul 15, 2014
1 parent 3971e4c commit 64827dc
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ add_subdirectory(src)
add_subdirectory(scripts)
add_subdirectory(db)
add_subdirectory(web)
add_subdirectory(onvif)

# Process misc subdirectories
if(ZM_TARGET_DISTRO STREQUAL "f19")
Expand Down
7 changes: 7 additions & 0 deletions onvif/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

10 changes: 10 additions & 0 deletions onvif/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
10 changes: 10 additions & 0 deletions onvif/proxy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
4 changes: 4 additions & 0 deletions onvif/scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 64827dc

Please sign in to comment.