Create ZM_TARGET_DISTRO
This commit is contained in:
parent
edcca74f95
commit
539c760d3c
|
@ -59,6 +59,7 @@ set(ZM_NO_MMAP "OFF" CACHE BOOL "Set to ON to not use mmap shared memory. Should
|
|||
set(ZM_NO_FFMPEG "OFF" CACHE BOOL "Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF")
|
||||
set(ZM_PERL_SUBPREFIX "${CMAKE_INSTALL_LIBDIR}/perl5" CACHE PATH "Use a different directory for the zm perl modules. NOTE: This is a subprefix, e.g. lib will be turned into <prefix>/lib, default: ${CMAKE_INSTALL_LIBDIR}/perl5")
|
||||
set(ZM_PERL_USE_PATH "${CMAKE_INSTALL_PREFIX}/${ZM_PERL_SUBPREFIX}" CACHE PATH "Override the include path for zm perl modules. Useful if you are moving the perl modules without using the ZM_PERL_SUBPREFIX option. default: <prefix>/<zmperlprefix>")
|
||||
set(ZM_TARGET_DISTRO "" CACHE STRING "Build ZoneMinder for a specific distribution. Currently, valid names are: f19, el6")
|
||||
# Only required for cmakecacheimport:
|
||||
set(CMAKE_INSTALL_FULL_BINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" CACHE PATH "Override default binary directory")
|
||||
|
||||
|
@ -423,6 +424,13 @@ set(WEB_USER "${ZM_WEB_USER}")
|
|||
set(WEB_GROUP "${ZM_WEB_GROUP}")
|
||||
set(EXTRA_PERL_LIB "use lib '${ZM_PERL_USE_PATH}';")
|
||||
|
||||
# Reassign some variables if a target distro has been specified
|
||||
if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "el6"))
|
||||
set(ZM_RUNDIR "/var/run/zoneminder")
|
||||
set(ZM_TMPDIR "/var/lib/zoneminder/temp")
|
||||
set(ZM_LOGDIR "/var/log/zoneminder")
|
||||
endif((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "el6"))
|
||||
|
||||
# Generate files from the .in files
|
||||
configure_file(zoneminder-config.cmake config.h @ONLY)
|
||||
configure_file(zm.conf.in zm.conf @ONLY)
|
||||
|
@ -433,8 +441,14 @@ configure_file(zmlinkcontent.sh.in zmlinkcontent.sh @ONLY)
|
|||
add_subdirectory(src)
|
||||
add_subdirectory(scripts)
|
||||
add_subdirectory(db)
|
||||
add_subdirectory(misc)
|
||||
add_subdirectory(web)
|
||||
if(ZM_TARGET_DISTRO STREQUAL "f19")
|
||||
add_subdirectory(distros/fedora)
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
add_subdirectory(distros/redhat)
|
||||
else(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
add_subdirectory(misc)
|
||||
endif(ZM_TARGET_DISTRO STREQUAL "f19")
|
||||
|
||||
# Print optional libraries detection status
|
||||
message(STATUS "Optional libraries found:${optlibsfound}")
|
||||
|
|
Loading…
Reference in New Issue