From 457e61ea427883942022def376787d3a9c4ce4eb Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 19 Mar 2014 19:07:36 -0500 Subject: [PATCH] tie distro/opensuse folder into cmake build process --- CMakeLists.txt | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97af402e4..23cb73c84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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_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 /lib, default: /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: /") -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 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(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(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @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) elseif(ZM_TARGET_DISTRO STREQUAL "el6") add_subdirectory(distros/redhat) +elseif(ZM_TARGET_DISTRO STREQUAL "OS13") + add_subdirectory(distros/opensuse) else(ZM_TARGET_DISTRO STREQUAL "el6") add_subdirectory(misc) endif(ZM_TARGET_DISTRO STREQUAL "f19")