]> granicus.if.org Git - icinga2/blob - lib/notification/CMakeLists.txt
Merge pull request #7185 from Icinga/bugfix/gelfwriter-wrong-log-facility
[icinga2] / lib / notification / CMakeLists.txt
1 # Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
2
3 mkclass_target(notificationcomponent.ti notificationcomponent-ti.cpp notificationcomponent-ti.hpp)
4
5 set(notification_SOURCES
6   notificationcomponent.cpp notificationcomponent.hpp notificationcomponent-ti.hpp
7 )
8
9 if(ICINGA2_UNITY_BUILD)
10   mkunity_target(notification notification notification_SOURCES)
11 endif()
12
13 add_library(notification OBJECT ${notification_SOURCES})
14
15 add_dependencies(notification base config icinga)
16
17 set_target_properties (
18   notification PROPERTIES
19   FOLDER Components
20 )
21
22 install_if_not_exists(
23   ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/notification.conf
24   ${ICINGA2_CONFIGDIR}/features-available
25 )
26
27 if(NOT WIN32)
28   install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_FULL_CONFIGDIR}/features-enabled\")")
29   install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../features-available/notification.conf \"\$ENV{DESTDIR}${ICINGA2_FULL_CONFIGDIR}/features-enabled/notification.conf\")")
30 else()
31   install_if_not_exists(${PROJECT_SOURCE_DIR}/etc/icinga2/features-enabled/notification.conf ${ICINGA2_CONFIGDIR}/features-enabled)
32 endif()
33
34 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}" PARENT_SCOPE)