Build: Reindent the CMakeLists

Indent with 2 spaces
Also remove expressions form closing tags. They have been made optional a while ago since they make reading rather more difficult.
This commit is contained in:
Peter Keresztes Schmidt 2021-02-04 22:00:56 +01:00
parent c57c50fd4a
commit 6c9983155c
10 changed files with 681 additions and 703 deletions

View File

@ -10,28 +10,22 @@ set(zoneminder_API_VERSION "${zoneminder_VERSION}.1")
# Make sure the submodules are there
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/web/api/app/Plugin/Crud/Lib/CrudControllerTrait.php")
message( SEND_ERROR "The git submodules are not available. Please run
git submodule update --init --recursive")
endif( NOT EXISTS "${CMAKE_SOURCE_DIR}/web/api/app/Plugin/Crud/Lib/CrudControllerTrait.php" )
message(SEND_ERROR "The git submodules are not available. Please run git submodule update --init --recursive")
endif()
# CMake does not allow out-of-source build if CMakeCache.exists
# in the source folder. Abort and notify the user
if(
(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
if((NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
message(FATAL_ERROR " You are attempting to do an out-of-source build,
but a cmake cache file for an in-source build exists. Please delete
the file CMakeCache.txt from the source folder to proceed.")
endif(
(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
endif()
# Default build type. To change the build type,
# use the CMAKE_BUILD_TYPE configuration option.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE
Release CACHE STRING "Build type: Release or Debug" FORCE)
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Release or Debug" FORCE)
endif()
# Can assist in troubleshooting
#set(CMAKE_VERBOSE_MAKEFILE ON)
@ -41,25 +35,26 @@ endif(NOT CMAKE_BUILD_TYPE)
set(HOST_OS "")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(HOST_OS "linux")
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
set(HOST_OS "solaris")
set(SOLARIS 1)
endif(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
set(HOST_OS "BSD")
set(BSD 1)
endif(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(HOST_OS "darwin")
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
endif()
if(NOT HOST_OS)
message(FATAL_ERROR
"ZoneMinder was unable to deterimine the host OS. Please report this. Value of CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
endif(NOT HOST_OS)
"ZoneMinder was unable to deterimine the host OS. Please report this.
Value of CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
endif()
set(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Default CLFAGS and CXXFLAGS:
set(CMAKE_C_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
@ -77,36 +72,35 @@ set (CMAKE_CXX_STANDARD 11)
# because passing -fmpu=neon is unsafe to processors that don't support neon
# Arm neon support only tested on Linux. If your arm hardware is running a non-Linux distro and is using gcc then contact us.
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ZM_SYSTEM_PROC)
IF((ZM_SYSTEM_PROC STREQUAL "") OR (ZM_SYSTEM_PROC STREQUAL "unknown"))
if((ZM_SYSTEM_PROC STREQUAL "") OR (ZM_SYSTEM_PROC STREQUAL "unknown"))
execute_process(COMMAND uname -m OUTPUT_VARIABLE ZM_SYSTEM_PROC ERROR_VARIABLE ZM_SYSTEM_PROC_ERR)
# maybe make the following error checks fatal
IF(ZM_SYSTEM_PROC_ERR)
if(ZM_SYSTEM_PROC_ERR)
message(WARNING "\nAn error occurred while attempting to determine the system processor:\n${ZM_SYSTEM_PROC_ERR}")
ENDIF(ZM_SYSTEM_PROC_ERR)
IF(NOT ZM_SYSTEM_PROC)
endif()
if(NOT ZM_SYSTEM_PROC)
message(WARNING "\nUnable to determine the system processor. This may cause a build failure.\n")
ENDIF(ZM_SYSTEM_PROC)
endif()
endif()
ENDIF((ZM_SYSTEM_PROC STREQUAL "") OR (ZM_SYSTEM_PROC STREQUAL "unknown"))
IF(ZM_SYSTEM_PROC MATCHES "^arm")
IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
EXEC_PROGRAM(grep ARGS " neon " "/proc/cpuinfo" OUTPUT_VARIABLE neonoutput RETURN_VALUE neonresult)
IF(neonresult EQUAL 0)
if(ZM_SYSTEM_PROC MATCHES "^arm")
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
exec_program(grep ARGS " neon " "/proc/cpuinfo" OUTPUT_VARIABLE neonoutput RETURN_VALUE neonresult)
if(neonresult EQUAL 0)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpu=neon")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpu=neon")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -mfpu=neon")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -mfpu=neon")
ELSE(neonresult EQUAL 0)
else()
add_definitions(-DZM_STRIP_NEON=1)
message(STATUS "ARM Neon is not available on this processor. Neon functions will be absent")
ENDIF(neonresult EQUAL 0)
ENDIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
ENDIF(ZM_SYSTEM_PROC MATCHES "^arm")
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
endif()
endif()
endif()
# Modules that we need:
include(GNUInstallDirs)
@ -260,7 +254,7 @@ elseif(ZM_TARGET_DISTRO STREQUAL "FreeBSD")
set(ZM_WEBDIR "/usr/local/share/zoneminder/www")
set(ZM_CGIDIR "/usr/local/libexec/zoneminder/cgi-bin")
set(ZM_PERL_MM_PARMS "INSTALLDIRS=site")
endif((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))
endif()
if(BUILD_MAN)
message(STATUS "Building man pages: Yes (default)")
@ -270,12 +264,10 @@ else()
list(APPEND ZM_PERL_MM_PARMS_FULL ${ZM_PERL_MM_PARMS}
"INSTALLMAN1DIR=none"
"INSTALLMAN3DIR=none")
endif(BUILD_MAN)
endif()
# 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)
# Required for including headers from the this folder
include_directories("${CMAKE_BINARY_DIR}")
# This is required to enable searching in lib64 (if exists), do not change
@ -284,13 +276,13 @@ set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
# Set the systemd flag if systemd is autodetected or ZM_SYSTEMD has been set
if(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system))
set(WITH_SYSTEMD 1)
endif(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system))
endif()
# System checks
check_include_file("libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H)
if(NOT HAVE_LIBV4L1_VIDEODEV_H)
check_include_file("linux/videodev.h" HAVE_LINUX_VIDEODEV_H)
endif(NOT HAVE_LIBV4L1_VIDEODEV_H)
endif()
check_include_file("linux/videodev2.h" HAVE_LINUX_VIDEODEV2_H)
check_include_file("execinfo.h" HAVE_EXECINFO_H)
if(HAVE_EXECINFO_H)
@ -299,10 +291,10 @@ if (HAVE_EXECINFO_H)
find_library(EXECINFO_LIBRARY NAMES execinfo)
if(EXECINFO_LIBRARY)
list(APPEND ZM_BIN_LIBS "-lexecinfo")
endif (EXECINFO_LIBRARY)
endif (NOT HAVE_DECL_BACKTRACE)
endif()
endif()
check_function_exists("backtrace_symbols" HAVE_DECL_BACKTRACE_SYMBOLS)
endif (HAVE_EXECINFO_H)
endif()
check_include_file("ucontext.h" HAVE_UCONTEXT_H)
check_include_file("sys/sendfile.h" HAVE_SYS_SENDFILE_H)
check_include_file("sys/syscall.h" HAVE_SYS_SYSCALL_H)
@ -319,10 +311,10 @@ if (UNIX)
CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
if(NOT HAVE_CLOCK_GETTIME)
message(FATAL_ERROR "clock_gettime not found")
else(NOT HAVE_CLOCK_GETTIME)
else()
list(APPEND ZM_BIN_LIBS "-lrt")
endif(NOT HAVE_CLOCK_GETTIME)
endif(UNIX)
endif()
endif()
# zlib
find_package(ZLIB)
@ -333,9 +325,9 @@ if(ZLIB_FOUND)
set(CMAKE_REQUIRED_INCLUDES "${ZLIB_INCLUDE_DIR}")
check_include_file("zlib.h" HAVE_ZLIB_H)
set(optlibsfound "${optlibsfound} zlib")
else(ZLIB_FOUND)
else()
set(optlibsnotfound "${optlibsnotfound} zlib")
endif(ZLIB_FOUND)
endif()
# Do not check for cURL if ZM_NO_CURL is on
if(NOT ZM_NO_CURL)
@ -348,10 +340,10 @@ if(NOT ZM_NO_CURL)
set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
check_include_file("curl/curl.h" HAVE_CURL_CURL_H)
set(optlibsfound "${optlibsfound} cURL")
else(CURL_FOUND)
else()
set(optlibsnotfound "${optlibsnotfound} cURL")
endif(CURL_FOUND)
endif(NOT ZM_NO_CURL)
endif()
endif()
# jpeg
find_package(JPEG)
@ -365,11 +357,11 @@ if(JPEG_FOUND)
if(NOT HAVE_JPEGLIB_H)
message(FATAL_ERROR
"ZoneMinder requires libjpeg headers - check that libjpeg development packages are installed")
endif(NOT HAVE_JPEGLIB_H)
else(JPEG_FOUND)
endif()
else()
message(FATAL_ERROR
"ZoneMinder requires jpeg but it was not found on your system")
endif(JPEG_FOUND)
endif()
# LIBJWT
find_package(LibJWT)
@ -377,9 +369,9 @@ if(LIBJWT_FOUND)
set(HAVE_LIBJWT 1)
set(optlibsfound "${optlibsfound} LIBJWT")
list(APPEND ZM_BIN_LIBS "${LIBJWT_LIBRARY}")
else(LIBJWT_FOUND)
else()
set(optlibsnotfound "${optlibsnotfound} LIBJWT")
endif(LIBJWT_FOUND)
endif()
# gnutls (using find_library and find_path)
if(HAVE_LIBJWT)
@ -391,14 +383,14 @@ if(HAVE_LIBJWT)
if(GNUTLS_INCLUDE_DIR)
include_directories("${GNUTLS_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
endif(GNUTLS_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR)
check_include_file("gnutls/gnutls.h" HAVE_GNUTLS_GNUTLS_H)
set(optlibsfound "${optlibsfound} GnuTLS")
else(GNUTLS_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} GnuTLS")
endif(GNUTLS_LIBRARIES)
endif(HAVE_LIBJWT)
endif()
endif()
# OpenSSL
if(NOT HAVE_LIBGNUTLS OR NOT HAVE_LIBJWT)
@ -411,10 +403,10 @@ if(NOT HAVE_LIBGNUTLS OR NOT HAVE_LIBJWT)
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H)
set(optlibsfound "${optlibsfound} OpenSSL")
else(OPENSSL_FOUND)
else()
set(optlibsnotfound "${optlibsnotfound} OpenSSL")
endif(OPENSSL_FOUND)
endif(NOT HAVE_LIBGNUTLS OR NOT HAVE_LIBJWT)
endif()
endif()
# pthread (using find_library and find_path)
find_library(PTHREAD_LIBRARIES pthread)
@ -425,17 +417,15 @@ if(PTHREAD_LIBRARIES)
if(PTHREAD_INCLUDE_DIR)
include_directories("${PTHREAD_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${PTHREAD_INCLUDE_DIR}")
endif(PTHREAD_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
check_include_file("pthread.h" HAVE_PTHREAD_H)
if(NOT HAVE_PTHREAD_H)
message(FATAL_ERROR
"ZoneMinder requires pthread headers - check that pthread development packages are installed")
endif(NOT HAVE_PTHREAD_H)
else(PTHREAD_LIBRARIES)
message(FATAL_ERROR
"ZoneMinder requires pthread but it was not found on your system")
endif(PTHREAD_LIBRARIES)
message(FATAL_ERROR "ZoneMinder requires pthread headers - check that pthread development packages are installed")
endif()
else()
message(FATAL_ERROR "ZoneMinder requires pthread but it was not found on your system")
endif()
# pcre (using find_library and find_path)
find_library(PCRE_LIBRARIES pcre)
@ -446,13 +436,13 @@ if(PCRE_LIBRARIES)
if(PCRE_INCLUDE_DIR)
include_directories("${PCRE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${PCRE_INCLUDE_DIR}")
endif(PCRE_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE PCRE_LIBRARIES PCRE_INCLUDE_DIR)
check_include_file("pcre.h" HAVE_PCRE_H)
set(optlibsfound "${optlibsfound} PCRE")
else(PCRE_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} PCRE")
endif(PCRE_LIBRARIES)
endif()
# gcrypt (using find_library and find_path)
find_library(GCRYPT_LIBRARIES gcrypt)
@ -463,13 +453,13 @@ if(GCRYPT_LIBRARIES)
if(GCRYPT_INCLUDE_DIR)
include_directories("${GCRYPT_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${GCRYPT_INCLUDE_DIR}")
endif(GCRYPT_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
check_include_file("gcrypt.h" HAVE_GCRYPT_H)
set(optlibsfound "${optlibsfound} GCrypt")
else(GCRYPT_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} GCrypt")
endif(GCRYPT_LIBRARIES)
endif()
# mysqlclient (using find_library and find_path)
find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
@ -480,17 +470,15 @@ if(MYSQLCLIENT_LIBRARIES)
if(MYSQLCLIENT_INCLUDE_DIR)
include_directories("${MYSQLCLIENT_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${MYSQLCLIENT_INCLUDE_DIR}")
endif(MYSQLCLIENT_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR)
check_include_file("mysql.h" HAVE_MYSQL_H)
if(NOT HAVE_MYSQL_H)
message(FATAL_ERROR
"ZoneMinder requires MySQL headers - check that MySQL development packages are installed")
endif(NOT HAVE_MYSQL_H)
else(MYSQLCLIENT_LIBRARIES)
message(FATAL_ERROR
"ZoneMinder requires mysqlclient but it was not found on your system")
endif(MYSQLCLIENT_LIBRARIES)
message(FATAL_ERROR "ZoneMinder requires MySQL headers - check that MySQL development packages are installed")
endif()
else()
message(FATAL_ERROR "ZoneMinder requires mysqlclient but it was not found on your system")
endif()
set(PATH_FFMPEG "")
set(OPT_FFMPEG "no")
@ -503,13 +491,13 @@ if(AVFORMAT_LIBRARIES)
if(AVFORMAT_INCLUDE_DIR)
include_directories("${AVFORMAT_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}")
endif(AVFORMAT_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIR)
check_include_file("libavformat/avformat.h" HAVE_LIBAVFORMAT_AVFORMAT_H)
set(optlibsfound "${optlibsfound} AVFormat")
else(AVFORMAT_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} AVFormat")
endif(AVFORMAT_LIBRARIES)
endif()
# avcodec (using find_library and find_path)
find_library(AVCODEC_LIBRARIES avcodec)
@ -520,14 +508,14 @@ if(AVCODEC_LIBRARIES)
if(AVCODEC_INCLUDE_DIR)
include_directories("${AVCODEC_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}")
endif(AVCODEC_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIR)
check_include_file("libavcodec/avcodec.h" HAVE_LIBAVCODEC_AVCODEC_H)
set(optlibsfound "${optlibsfound} AVCodec")
else(AVCODEC_LIBRARIES)
else()
message(WARNING "\nWhile it should be possible to build ZM without AVCODEC the result will pretty useless.")
set(optlibsnotfound "${optlibsnotfound} AVCodec")
endif(AVCODEC_LIBRARIES)
endif()
# avdevice (using find_library and find_path)
find_library(AVDEVICE_LIBRARIES avdevice)
@ -538,13 +526,13 @@ if(AVDEVICE_LIBRARIES)
if(AVDEVICE_INCLUDE_DIR)
include_directories("${AVDEVICE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}")
endif(AVDEVICE_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE AVDEVICE_LIBRARIES AVDEVICE_INCLUDE_DIR)
check_include_file("libavdevice/avdevice.h" HAVE_LIBAVDEVICE_AVDEVICE_H)
set(optlibsfound "${optlibsfound} AVDevice")
else(AVDEVICE_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} AVDevice")
endif(AVDEVICE_LIBRARIES)
endif()
# avutil (using find_library and find_path)
find_library(AVUTIL_LIBRARIES avutil)
@ -555,15 +543,15 @@ if(AVUTIL_LIBRARIES)
if(AVUTIL_INCLUDE_DIR)
include_directories("${AVUTIL_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}")
endif(AVUTIL_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIR)
check_include_file("libavutil/avutil.h" HAVE_LIBAVUTIL_AVUTIL_H)
check_include_file("libavutil/mathematics.h" HAVE_LIBAVUTIL_MATHEMATICS_H)
check_include_file("libavutil/hwcontext.h" HAVE_LIBAVUTIL_HWCONTEXT_H)
set(optlibsfound "${optlibsfound} AVUtil")
else(AVUTIL_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} AVUtil")
endif(AVUTIL_LIBRARIES)
endif()
# swscale (using find_library and find_path)
find_library(SWSCALE_LIBRARIES swscale)
@ -574,13 +562,13 @@ if(SWSCALE_LIBRARIES)
if(SWSCALE_INCLUDE_DIR)
include_directories("${SWSCALE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}")
endif(SWSCALE_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIR)
check_include_file("libswscale/swscale.h" HAVE_LIBSWSCALE_SWSCALE_H)
set(optlibsfound "${optlibsfound} SWScale")
else(SWSCALE_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} SWScale")
endif(SWSCALE_LIBRARIES)
endif()
# SWresample (using find_library and find_path)
find_library(SWRESAMPLE_LIBRARIES swresample)
@ -591,11 +579,11 @@ if(SWRESAMPLE_LIBRARIES)
if(SWRESAMPLE_INCLUDE_DIR)
include_directories("${SWRESAMPLE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${SWRESAMPLE_INCLUDE_DIR}")
endif(SWRESAMPLE_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE SWRESAMPLE_LIBRARIES SWRESAMPLE_INCLUDE_DIR)
check_include_file("libswresample/swresample.h" HAVE_LIBSWRESAMPLE_SWRESAMPLE_H)
set(optlibsfound "${optlibsfound} SWResample")
else(SWRESAMPLE_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} SWResample")
# AVresample (using find_library and find_path)
@ -607,15 +595,14 @@ else(SWRESAMPLE_LIBRARIES)
if(AVRESAMPLE_INCLUDE_DIR)
include_directories("${AVRESAMPLE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVRESAMPLE_INCLUDE_DIR}")
endif(AVRESAMPLE_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE AVRESAMPLE_LIBRARIES AVRESAMPLE_INCLUDE_DIR)
check_include_file("libavresample/avresample.h" HAVE_LIBAVRESAMPLE_AVRESAMPLE_H)
set(optlibsfound "${optlibsfound} AVResample")
else(AVRESAMPLE_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} AVResample")
endif(AVRESAMPLE_LIBRARIES)
endif(SWRESAMPLE_LIBRARIES)
endif()
endif()
# Find the path to the ffmpeg executable
find_program(FFMPEG_EXECUTABLE
@ -625,7 +612,7 @@ if(FFMPEG_EXECUTABLE)
set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}")
set(OPT_FFMPEG "yes")
mark_as_advanced(FFMPEG_EXECUTABLE)
endif(FFMPEG_EXECUTABLE)
endif()
# Do not check for libvlc if ZM_NO_LIBVLC is on
if(NOT ZM_NO_LIBVLC)
@ -638,14 +625,14 @@ if(NOT ZM_NO_LIBVLC)
if(LIBVLC_INCLUDE_DIR)
include_directories("${LIBVLC_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${LIBVLC_INCLUDE_DIR}")
endif(LIBVLC_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE LIBVLC_LIBRARIES LIBVLC_INCLUDE_DIR)
check_include_file("vlc/vlc.h" HAVE_VLC_VLC_H)
set(optlibsfound "${optlibsfound} libVLC")
else(LIBVLC_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} libVLC")
endif(LIBVLC_LIBRARIES)
endif(NOT ZM_NO_LIBVLC)
endif()
endif()
if(NOT ZM_NO_LIBVNC)
# libvncclient (using find_library and find_path)
@ -657,14 +644,14 @@ if(NOT ZM_NO_LIBVNC)
if(LIBVNC_INCLUDE_DIR)
include_directories("${LIBVNC_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${LIBVNC_INCLUDE_DIR}")
endif(LIBVNC_INCLUDE_DIR)
endif()
mark_as_advanced(FORCE LIBVNC_LIBRARIES LIBVNC_INCLUDE_DIR)
check_include_file("rfb/rfb.h" HAVE_RFB_RFB_H)
set(optlibsfound "${optlibsfound} libVNC")
else(LIBVNC_LIBRARIES)
else()
set(optlibsnotfound "${optlibsnotfound} libVNC")
endif(LIBVNC_LIBRARIES)
endif(NOT ZM_NO_LIBVNC)
endif()
endif()
#find_package(Boost 1.36.0)
#if(Boost_FOUND)
@ -681,22 +668,21 @@ if(NOT ZM_NO_RTSPSERVER)
list(APPEND ZM_BIN_LIBS "${Live555_LIBRARIES}")
set(HAVE_RTSP_SERVER 1)
set(optlibsfound "${optlibsfound} libLive555")
else(Live555_FOUND)
else()
set(HAVE_RTSP_SERVER 0)
set(optlibsnotfound "${optlibsnotfound} libLive555")
endif(Live555_FOUND)
else(NOT ZM_NO_RTSPSERVER)
endif()
else()
set(HAVE_RTSP_SERVER 0)
endif(NOT ZM_NO_RTSPSERVER)
endif()
#
# *** END OF LIBRARY CHECKS ***
# Check for gnutls or crypto
if((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
message(FATAL_ERROR
"ZoneMinder requires crypto or gnutls but none were found on your system")
endif((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
message(FATAL_ERROR "ZoneMinder requires crypto or gnutls but none were found on your system")
endif()
# Check for V4L header files and enable ZM_HAS_V4L, ZM_HAS_V4L1, ZM_HAS_V4L2 accordingly
# Setting to zeros first is required because ZM uses #define for these
@ -706,24 +692,21 @@ set(ZM_HAS_V4L2 0)
if(HAVE_LINUX_VIDEODEV_H OR HAVE_LIBV4L1_VIDEODEV_H)
set(ZM_HAS_V4L 1)
set(ZM_HAS_V4L1 1)
endif(HAVE_LINUX_VIDEODEV_H OR HAVE_LIBV4L1_VIDEODEV_H)
endif()
if(HAVE_LINUX_VIDEODEV2_H)
set(ZM_HAS_V4L 1)
set(ZM_HAS_V4L2 1)
endif(HAVE_LINUX_VIDEODEV2_H)
endif()
if((NOT HAVE_LINUX_VIDEODEV_H)
AND (NOT HAVE_LIBV4L1_VIDEODEV_H)
AND (NOT HAVE_LINUX_VIDEODEV2_H))
message(AUTHOR_WARNING
"Video 4 Linux headers weren't found - Analog and USB camera support will not be available")
endif((NOT HAVE_LINUX_VIDEODEV_H)
AND (NOT HAVE_LIBV4L1_VIDEODEV_H)
AND (NOT HAVE_LINUX_VIDEODEV2_H))
message(AUTHOR_WARNING "Video 4 Linux headers weren't found - Analog and USB camera support will not be available")
endif()
# Check for PCRE and enable ZM_PCRE accordingly
set(ZM_PCRE 0)
if(HAVE_LIBPCRE AND HAVE_PCRE_H)
set(ZM_PCRE 1)
endif(HAVE_LIBPCRE AND HAVE_PCRE_H)
endif()
# Check for mmap and enable in all components
set(ZM_MEM_MAPPED 0)
set(ENABLE_MMAP no)
@ -731,13 +714,13 @@ if(NOT ZM_NO_MMAP)
set(ZM_MEM_MAPPED 1)
set(ENABLE_MMAP yes)
set(ZM_MMAP_PERLPACKAGE "Sys::Mmap")
endif(NOT ZM_NO_MMAP)
endif()
# Check for the ONVIF flag and enable ZM_HAS_ONVIF accordingly
set(ZM_HAS_ONVIF 0)
if(ZM_ONVIF)
set(ZM_HAS_ONVIF 1)
endif(ZM_ONVIF)
endif()
# Check for authentication functions
if(HAVE_OPENSSL_MD5_H)
@ -747,7 +730,7 @@ if(HAVE_OPENSSL_MD5_H)
MD5
"unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md)" "NULL" "openssl/md5.h"
HAVE_MD5_OPENSSL)
endif(HAVE_OPENSSL_MD5_H)
endif()
if(HAVE_GNUTLS_GNUTLS_H)
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
@ -756,31 +739,30 @@ if(HAVE_GNUTLS_GNUTLS_H)
gnutls_fingerprint
"int gnutls_fingerprint (gnutls_digest_algorithm_t algo, const gnutls_datum_t * data, void *result, size_t * result_size)" "0" "stdlib.h;gnutls/gnutls.h"
HAVE_DECL_GNUTLS_FINGERPRINT)
endif(HAVE_GNUTLS_GNUTLS_H)
endif()
if(NOT HAVE_DECL_GNUTLS_FINGERPRINT AND HAVE_MD5_OPENSSL)
set(HAVE_DECL_MD5 1)
endif(NOT HAVE_DECL_GNUTLS_FINGERPRINT AND HAVE_MD5_OPENSSL)
endif()
if((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT))
message(AUTHOR_WARNING
"ZoneMinder requires a working MD5 function for hashed authentication but
none were found - hashed authentication will not be available")
endif((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT))
endif()
# Dirty fix for zm_user only using openssl's md5 if gnutls and gcrypt are not available.
# This needs to be fixed in zm_user.[h,cpp] but such fix will also require changes to configure.ac
if(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL)
set(HAVE_GCRYPT_H 0)
set(HAVE_GNUTLS_OPENSSL_H 0)
endif(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL)
endif()
# Check for Perl
find_package(Perl)
if(NOT PERL_FOUND)
message(FATAL_ERROR
"ZoneMinder requires Perl 5.6.0 or newer but it was not found on your system")
endif(NOT PERL_FOUND)
message(FATAL_ERROR "ZoneMinder requires Perl 5.6.0 or newer but it was not found on your system")
endif()
# Checking for perl modules requires FindPerlModules.cmake
# Check all required modules at once
@ -790,9 +772,8 @@ find_package(
Getopt::Long Time::HiRes Date::Manip LWP::UserAgent
ExtUtils::MakeMaker ${ZM_MMAP_PERLPACKAGE})
if(NOT PERLMODULES_FOUND)
message(WARNING
"Not all required perl modules were found on your system")
endif(NOT PERLMODULES_FOUND)
message(WARNING "Not all required perl modules were found on your system")
endif()
# Attempt to check which user apache (or other web server) runs on by
# searching for a user beginning with apache or www and then cutting the user
@ -812,13 +793,13 @@ if(ZM_WEB_USER STREQUAL "")
COMMAND echo ${userline_www}
COMMAND cut -d: -f1 OUTPUT_VARIABLE ZM_WEB_USER
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif(NOT (userline_apache STREQUAL ""))
endif()
message(STATUS "Detected web server user: ${ZM_WEB_USER}")
endif(ZM_WEB_USER STREQUAL "")
endif()
# Check if webgroup contains anything. If not, use the web user as the web group
if(NOT ZM_WEB_GROUP)
set(ZM_WEB_GROUP ${ZM_WEB_USER})
endif(NOT ZM_WEB_GROUP)
endif()
message(STATUS "Using web user: ${ZM_WEB_USER}")
message(STATUS "Using web group: ${ZM_WEB_GROUP}")
@ -826,10 +807,9 @@ if(WITH_SYSTEMD)
# Check for polkit
find_package(Polkit)
if(NOT POLKIT_FOUND)
message(WARNING
"Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
endif(NOT POLKIT_FOUND)
endif(WITH_SYSTEMD)
message(WARNING "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
endif()
endif()
# Find the path to an arp compatible executable
if(ZM_PATH_ARP STREQUAL "")
@ -837,17 +817,17 @@ if(ZM_PATH_ARP STREQUAL "")
if(ARP_EXECUTABLE)
set(ZM_PATH_ARP "${ARP_EXECUTABLE}")
mark_as_advanced(ARP_EXECUTABLE)
else(ARP_EXECUTABLE)
else()
find_program(ARP_EXECUTABLE ip)
if(ARP_EXECUTABLE)
set(ZM_PATH_ARP "${ARP_EXECUTABLE} neigh")
mark_as_advanced(ARP_EXECUTABLE)
endif(ARP_EXECUTABLE)
endif(ARP_EXECUTABLE)
endif()
endif()
if(ARP_EXECUTABLE-NOTFOUND)
message(WARNING "Unable to find a compatible arp binary. Monitor probe will not function.")
endif(ARP_EXECUTABLE-NOTFOUND)
endif(ZM_PATH_ARP STREQUAL "")
endif()
endif()
# Some variables that zm expects
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
@ -865,14 +845,14 @@ set(WEB_GROUP "${ZM_WEB_GROUP}")
set(ZM_DB_TYPE "mysql")
if(ZM_PERL_SEARCH_PATH)
set(EXTRA_PERL_LIB "use lib '${ZM_PERL_SEARCH_PATH}'; # Include custom perl install path")
else(ZM_PERL_SEARCH_PATH)
else()
set(EXTRA_PERL_LIB "# Include from system perl paths only")
endif(ZM_PERL_SEARCH_PATH)
endif()
# If this is an out-of-source build, copy the files we need to the binary directory
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf.d" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN "*.in" EXCLUDE)
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
endif()
# Generate files from the .in files
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
@ -908,14 +888,14 @@ if(BUILD_TEST_SUITE)
add_subdirectory(tests)
else()
message("Building unit tests: No (default)")
endif(BUILD_TEST_SUITE)
endif()
# Process distro subdirectories
if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))
add_subdirectory(distros/redhat)
elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
elseif()
add_subdirectory(distros/opensuse)
endif((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))
endif()
# Print optional libraries detection status
message(STATUS "Optional libraries found:${optlibsfound}")
@ -923,14 +903,12 @@ message(STATUS "Optional libraries not found:${optlibsnotfound}")
# Run ZM configuration generator
message(STATUS "Running ZoneMinder configuration generator")
execute_process(COMMAND perl ${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl RESULT_VARIABLE zmconfgen_result)
if(zmconfgen_result EQUAL 0)
message(STATUS
"ZoneMinder configuration generator completed successfully")
else(zmconfgen_result EQUAL 0)
message(FATAL_ERROR
"ZoneMinder configuration generator failed. Exit code: ${zmconfgen_result}")
endif(zmconfgen_result EQUAL 0)
execute_process(COMMAND perl ${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl RESULT_VARIABLE ZMCONFGEN_RESULT)
if(ZMCONFGEN_RESULT EQUAL 0)
message(STATUS "ZoneMinder configuration generator completed successfully")
else()
message(FATAL_ERROR "ZoneMinder configuration generator failed. Exit code: ${zmconfgen_result}")
endif()
# Install zm.conf
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "${ZM_CONFIG_DIR}")
@ -949,6 +927,6 @@ find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
endif()
install(DIRECTORY icons DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/")

View File

@ -10,9 +10,9 @@ if(ZM_TARGET_DISTRO MATCHES "^el")
message([STATUS] "Starting RHEL Build Options" ...)
elseif(ZM_TARGET_DISTRO MATCHES "^fc")
message([STATUS] "Starting Fedora Build Options" ...)
else(ZM_TARGET_DISTRO MATCHES "^el")
else()
message([WARNING] "Unknown Build Option Detected" ...)
endif(ZM_TARGET_DISTRO MATCHES "^el")
endif()
#
# CONFIGURE STAGE

View File

@ -2,4 +2,3 @@
file(GLOB fontfileslist RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.zmfnt")
# Install the fonts
install(FILES ${fontfileslist} DESTINATION "${ZM_FONTDIR}")

View File

@ -19,5 +19,6 @@ configure_file(zm-sudo.in "${CMAKE_CURRENT_BINARY_DIR}/zm-sudo" @ONLY)
if(WITH_SYSTEMD)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d")
endif(WITH_SYSTEMD)
endif()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.desktop" DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")

View File

@ -4,7 +4,7 @@
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.PL" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/lib" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN "*.in" EXCLUDE)
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
endif()
# MAKEMAKER_NOECHO_COMMAND previously defined in /scripts/zoneminder/CMakeLists.txt

View File

@ -4,7 +4,7 @@
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.PL" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/lib" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN "*.in" EXCLUDE)
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
endif()
# MAKEMAKER_NOECHO_COMMAND previously defined in /scripts/zoneminder/CMakeLists.txt

View File

@ -23,7 +23,7 @@ configure_file(zmsystemctl.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" @O
configure_file(zmtelemetry.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmtelemetry.pl" @ONLY)
if(NOT ZM_NO_X10)
configure_file(zmx10.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmx10.pl" @ONLY)
endif(NOT ZM_NO_X10)
endif()
#configure_file(zmdbbackup.in zmdbbackup @ONLY)
#configure_file(zmdbrestore.in zmdbrestore @ONLY)
configure_file(zm.in "${CMAKE_CURRENT_BINARY_DIR}/zm" @ONLY)
@ -32,11 +32,11 @@ configure_file(zm.in "${CMAKE_CURRENT_BINARY_DIR}/zm" @ONLY)
# Generate man files for the perl scripts destined for the bin folder
if(BUILD_MAN)
file(GLOB perlscripts "${CMAKE_CURRENT_BINARY_DIR}/*.pl")
FOREACH(PERLSCRIPT ${perlscripts})
foreach(PERLSCRIPT ${perlscripts})
get_filename_component(PERLSCRIPTNAME ${PERLSCRIPT} NAME)
POD2MAN(${PERLSCRIPT} ${PERLSCRIPTNAME} 8 ${ZM_MANPAGE_DEST_PREFIX})
ENDFOREACH(PERLSCRIPT ${perlscripts})
endif(BUILD_MAN)
endforeach(PERLSCRIPT ${perlscripts})
endif()
# Install the perl scripts
install(FILES
@ -59,8 +59,8 @@ install(FILES
DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
if(NOT ZM_NO_X10)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmx10.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif(NOT ZM_NO_X10)
endif()
if(WITH_SYSTEMD)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif(WITH_SYSTEMD)
endif()

View File

@ -9,7 +9,7 @@ if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/README" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/t" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/lib" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN "*.in" EXCLUDE)
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
endif()
# Create files from the .in files
configure_file(lib/ZoneMinder/Base.pm.in "${CMAKE_CURRENT_BINARY_DIR}/lib/ZoneMinder/Base.pm" @ONLY)
@ -20,9 +20,9 @@ configure_file(lib/ZoneMinder/ONVIF.pm.in "${CMAKE_CURRENT_BINARY_DIR}/lib/ZoneM
if(CMAKE_VERBOSE_MAKEFILE)
set(MAKEMAKER_NOECHO_COMMAND "")
else(CMAKE_VERBOSE_MAKEFILE)
else()
set(MAKEMAKER_NOECHO_COMMAND "NOECHO=\"1>/dev/null\"")
endif(CMAKE_VERBOSE_MAKEFILE)
endif()
# Add build target for the perl modules
add_custom_target(zmperlmodules ALL perl Makefile.PL ${ZM_PERL_MM_PARMS_FULL} FIRST_MAKEFILE=MakefilePerl DESTDIR="${CMAKE_CURRENT_BINARY_DIR}/output" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make -f MakefilePerl pure_install COMMENT "Building ZoneMinder perl modules")

View File

@ -93,10 +93,10 @@ target_link_libraries(zms zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS} ${CMAKE_DL_LIBS} bc
# Generate man files for the binaries destined for the bin folder
if(BUILD_MAN)
FOREACH(CBINARY zmc zmu)
foreach(CBINARY zmc zmu)
POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp ${CBINARY} 8 ${ZM_MANPAGE_DEST_PREFIX})
ENDFOREACH(CBINARY zmc zmu)
endif(BUILD_MAN)
endforeach(CBINARY zmc zmu)
endif()
install(TARGETS zmc zmu RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(TARGETS zms RUNTIME DESTINATION "${ZM_CGIDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

View File

@ -16,4 +16,4 @@ if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/api/app/Config/database.php" DESTINATION "${ZM_WEBDIR}/api/app/Config")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/api/app/Config/bootstrap.php" DESTINATION "${ZM_WEBDIR}/api/app/Config")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/api/lib/Cake/bootstrap.php" DESTINATION "${ZM_WEBDIR}/api/lib/Cake")
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
endif()