]> granicus.if.org Git - icinga2/blob - lib/icinga/CMakeLists.txt
Merge branch 'support/2.4'
[icinga2] / lib / icinga / CMakeLists.txt
1 # Icinga 2
2 # Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)
3 #
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.
8 #
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.
13 #
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.
17
18 mkclass_target(checkable.ti checkable.tcpp checkable.thpp)
19 mkclass_target(checkcommand.ti checkcommand.tcpp checkcommand.thpp)
20 mkclass_target(checkresult.ti checkresult.tcpp checkresult.thpp)
21 mkclass_target(command.ti command.tcpp command.thpp)
22 mkclass_target(comment.ti comment.tcpp comment.thpp)
23 mkclass_target(dependency.ti dependency.tcpp dependency.thpp)
24 mkclass_target(downtime.ti downtime.tcpp downtime.thpp)
25 mkclass_target(eventcommand.ti eventcommand.tcpp eventcommand.thpp)
26 mkclass_target(hostgroup.ti hostgroup.tcpp hostgroup.thpp)
27 mkclass_target(host.ti host.tcpp host.thpp)
28 mkclass_target(icingaapplication.ti icingaapplication.tcpp icingaapplication.thpp)
29 mkclass_target(customvarobject.ti customvarobject.tcpp customvarobject.thpp)
30 mkclass_target(notificationcommand.ti notificationcommand.tcpp notificationcommand.thpp)
31 mkclass_target(notification.ti notification.tcpp notification.thpp)
32 mkclass_target(perfdatavalue.ti perfdatavalue.tcpp perfdatavalue.thpp)
33 mkclass_target(scheduleddowntime.ti scheduleddowntime.tcpp scheduleddowntime.thpp)
34 mkclass_target(servicegroup.ti servicegroup.tcpp servicegroup.thpp)
35 mkclass_target(service.ti service.tcpp service.thpp)
36 mkclass_target(timeperiod.ti timeperiod.tcpp timeperiod.thpp)
37 mkclass_target(usergroup.ti usergroup.tcpp usergroup.thpp)
38 mkclass_target(user.ti user.tcpp user.thpp)
39
40 set(icinga_SOURCES
41   apiactions.cpp apievents.cpp checkable.cpp checkable.thpp checkable-dependency.cpp checkable-downtime.cpp checkable-event.cpp
42   checkable-flapping.cpp checkcommand.cpp checkcommand.thpp checkresult.cpp checkresult.thpp
43   cib.cpp clusterevents.cpp command.cpp command.thpp comment.cpp comment.thpp compatutility.cpp dependency.cpp dependency.thpp
44   dependency-apply.cpp downtime.cpp downtime.thpp eventcommand.cpp eventcommand.thpp
45   externalcommandprocessor.cpp host.cpp host.thpp hostgroup.cpp hostgroup.thpp icingaapplication.cpp icingaapplication.thpp
46   customvarobject.cpp customvarobject.thpp
47   legacytimeperiod.cpp macroprocessor.cpp notificationcommand.cpp notificationcommand.thpp notification.cpp notification.thpp
48   notification-apply.cpp objectutils.cpp perfdatavalue.cpp perfdatavalue.thpp pluginutility.cpp scheduleddowntime.cpp scheduleddowntime.thpp
49   scheduleddowntime-apply.cpp service-apply.cpp checkable-check.cpp checkable-comment.cpp
50   service.cpp service.thpp servicegroup.cpp servicegroup.thpp checkable-notification.cpp timeperiod.cpp timeperiod.thpp
51   user.cpp user.thpp usergroup.cpp usergroup.thpp
52 )
53
54 if(ICINGA2_UNITY_BUILD)
55     mkunity_target(icinga icinga_SOURCES)
56 endif()
57
58 add_library(icinga SHARED ${icinga_SOURCES})
59
60 target_link_libraries(icinga ${Boost_LIBRARIES} base config remote)
61
62 set_target_properties (
63   icinga PROPERTIES
64   INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
65   DEFINE_SYMBOL I2_ICINGA_BUILD
66   FOLDER Lib
67 )
68
69 install(
70   TARGETS icinga
71   RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
72   LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/icinga2
73 )
74
75