2 # Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18 mkclass_target(checkresultreader.ti checkresultreader-ti.cpp checkresultreader-ti.hpp)
19 mkclass_target(compatlogger.ti compatlogger-ti.cpp compatlogger-ti.hpp)
20 mkclass_target(externalcommandlistener.ti externalcommandlistener-ti.cpp externalcommandlistener-ti.hpp)
21 mkclass_target(statusdatawriter.ti statusdatawriter-ti.cpp statusdatawriter-ti.hpp)
24 checkresultreader.cpp checkresultreader.hpp checkresultreader-ti.hpp
25 compatlogger.cpp compatlogger.hpp compatlogger-ti.hpp
26 externalcommandlistener.cpp externalcommandlistener.hpp externalcommandlistener-ti.hpp
27 statusdatawriter.cpp statusdatawriter.hpp statusdatawriter-ti.hpp
30 if(ICINGA2_UNITY_BUILD)
31 mkunity_target(compat compat compat_SOURCES)
34 add_library(compat OBJECT ${compat_SOURCES})
36 add_dependencies(compat base config icinga)
38 set_target_properties (
43 install_if_not_exists(
44 ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/command.conf
45 ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available
48 install_if_not_exists(
49 ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/compatlog.conf
50 ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available
53 install_if_not_exists(
54 ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/statusdata.conf
55 ${CMAKE_INSTALL_SYSCONFDIR}/icinga2/features-available
58 install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/log/icinga2/compat/archives\")")
59 install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/spool/icinga2\")")
60 install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_RUNDIR}/icinga2/cmd\")")
62 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}" PARENT_SCOPE)