tie distro/opensuse folder into cmake build process
This commit is contained in:
parent
74347d9bbc
commit
457e61ea42
|
@ -67,7 +67,23 @@ set(ZM_NO_CURL "OFF" CACHE BOOL "Set to ON to skip cURL checks and force buildin
|
||||||
set(ZM_NO_X10 "OFF" CACHE BOOL "Set to ON to build ZoneMinder without X10 support. default: OFF")
|
set(ZM_NO_X10 "OFF" CACHE BOOL "Set to ON to build ZoneMinder without X10 support. 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: <libdir>/perl5")
|
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: <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>/<zmperlsubprefix>")
|
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>/<zmperlsubprefix>")
|
||||||
set(ZM_TARGET_DISTRO "" CACHE STRING "Build ZoneMinder for a specific distribution. Currently, valid names are: f19, el6")
|
set(ZM_TARGET_DISTRO "" CACHE STRING "Build ZoneMinder for a specific distribution. Currently, valid names are: f19, el6, OS13")
|
||||||
|
|
||||||
|
# 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")
|
||||||
|
elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||||
|
set(ZM_RUNDIR "/var/run/zoneminder")
|
||||||
|
set(ZM_TMPDIR "/var/run/zoneminder")
|
||||||
|
set(ZM_CONTENTDIR "/var/run/zoneminder")
|
||||||
|
set(ZM_LOGDIR "/var/log/zoneminder")
|
||||||
|
set(ZM_WEB_USER "wwwrun")
|
||||||
|
set(ZM_WEB_GROUP "www")
|
||||||
|
set(ZM_WEBDIR "/srv/www/htdocs/zoneminder")
|
||||||
|
set(ZM_CGIDIR "/srv/www/cgi-bin")
|
||||||
|
endif((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "el6"))
|
||||||
|
|
||||||
# Required for certain checks to work
|
# Required for certain checks to work
|
||||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} stdio.h stdlib.h math.h signal.h)
|
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} stdio.h stdlib.h math.h signal.h)
|
||||||
|
@ -475,13 +491,6 @@ set(WEB_GROUP "${ZM_WEB_GROUP}")
|
||||||
set(ZM_DB_TYPE "mysql")
|
set(ZM_DB_TYPE "mysql")
|
||||||
set(EXTRA_PERL_LIB "use lib '${ZM_PERL_USE_PATH}';")
|
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
|
# Generate files from the .in files
|
||||||
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
|
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
|
||||||
configure_file(zoneminder-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
|
configure_file(zoneminder-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
|
||||||
|
@ -499,6 +508,8 @@ if(ZM_TARGET_DISTRO STREQUAL "f19")
|
||||||
add_subdirectory(distros/fedora)
|
add_subdirectory(distros/fedora)
|
||||||
elseif(ZM_TARGET_DISTRO STREQUAL "el6")
|
elseif(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||||
add_subdirectory(distros/redhat)
|
add_subdirectory(distros/redhat)
|
||||||
|
elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||||
|
add_subdirectory(distros/opensuse)
|
||||||
else(ZM_TARGET_DISTRO STREQUAL "el6")
|
else(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||||
add_subdirectory(misc)
|
add_subdirectory(misc)
|
||||||
endif(ZM_TARGET_DISTRO STREQUAL "f19")
|
endif(ZM_TARGET_DISTRO STREQUAL "f19")
|
||||||
|
|
Loading…
Reference in New Issue