Merge branch 'larsengels-master'

fixes #7680
This commit is contained in:
Gunnar Beutner 2014-11-14 10:44:14 +01:00
commit 6ca188e090
7 changed files with 30 additions and 8 deletions

View File

@ -28,6 +28,9 @@ if(NOT CMAKE_BUILD_TYPE)
FORCE)
endif()
option(ICINGA2_WITH_MYSQL "MySQL support" ON)
option(ICINGA2_WITH_PGSQL "PostgreSQL support" ON)
file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ")
string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE})

View File

@ -25,9 +25,12 @@ parentheses):
* Boost library and header files (boost-devel on RHEL, libboost-all-dev on Debian)
* GNU bison (bison)
* GNU flex (flex) >= 2.5.35
* recommended: libexecinfo on FreeBSD
* optional: MySQL (mysql-devel on RHEL, libmysqlclient-dev on Debian)
* optional: PostgreSQL (postgresql-devel on RHEL, libpq-dev on Debian)
* recommended: libexecinfo on FreeBSD (automatically used when Icinga 2 is
installed via port or package)
* optional: MySQL (mysql-devel on RHEL, libmysqlclient-dev on Debian) set CMake
variable `ICINGA2_WITH_MYSQL` to enable
* optional: PostgreSQL (postgresql-devel on RHEL, libpq-dev on Debian) set CMake
variable `ICINGA2_WITH_PGSQL` to enable
* optional: YAJL (yajl-devel on RHEL, libyajl-dev on Debian)
Note: RHEL5 ships an ancient flex version. Updated packages are available for

View File

@ -20,7 +20,10 @@ include(InstallConfig)
configure_file(icinga/icinga-classic-apache.conf.cmake ${CMAKE_CURRENT_BINARY_DIR}/icinga/icinga-classic-apache.conf @ONLY)
configure_file(icinga2/init.conf.cmake ${CMAKE_CURRENT_BINARY_DIR}/icinga2/init.conf @ONLY)
configure_file(icinga2/constants.conf.cmake ${CMAKE_CURRENT_BINARY_DIR}/icinga2/constants.conf @ONLY)
configure_file(logrotate.d/icinga2.cmake ${CMAKE_CURRENT_BINARY_DIR}/logrotate.d/icinga2 @ONLY)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
configure_file(logrotate.d/icinga2.cmake ${CMAKE_CURRENT_BINARY_DIR}/logrotate.d/icinga2 @ONLY)
endif()
install_if_not_exists(${CMAKE_CURRENT_BINARY_DIR}/icinga2/init.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2)
install_if_not_exists(icinga2/icinga2.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2)
@ -79,6 +82,8 @@ else()
)
endif()
add_subdirectory(initsystem)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_subdirectory(initsystem)
endif()
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}" PARENT_SCOPE)

View File

@ -25,8 +25,15 @@ add_subdirectory(hello)
add_subdirectory(remote)
add_subdirectory(checker)
add_subdirectory(compat)
add_subdirectory(db_ido_mysql)
add_subdirectory(db_ido_pgsql)
if(ICINGA2_WITH_MYSQL)
add_subdirectory(db_ido_mysql)
endif()
if(ICINGA2_WITH_PGSQL)
add_subdirectory(db_ido_pgsql)
endif()
add_subdirectory(demo)
add_subdirectory(livestatus)
add_subdirectory(notification)

View File

@ -58,4 +58,6 @@ if(MYSQL_FOUND)
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2-ido-mysql/schema
FILES_MATCHING PATTERN "*.sql"
)
else()
message( FATAL_ERROR "You have selected MySQL support, but MySQL could not be found." )
endif()

View File

@ -60,4 +60,6 @@ if(PostgreSQL_FOUND)
DESTINATION ${CMAKE_INSTALL_DATADIR}/icinga2-ido-pgsql/schema
FILES_MATCHING PATTERN "*.sql"
)
else()
message( FATAL_ERROR "You have selected PostgreSQL support, but PostgreSQL could not be found." )
endif()

View File

@ -166,7 +166,7 @@ if(NOT CMAKE_INSTALL_DATADIR)
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
if(CMAKE_SYSTEM_NAME MATCHES "(DragonFly|FreeBSD|OpenBSD)")
if(NOT CMAKE_INSTALL_INFODIR)
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (info)")
set(CMAKE_INSTALL_INFODIR "info")