]> granicus.if.org Git - icinga2/blob - lib/icinga/CMakeLists.txt
d2abf4e50064b1e33c4ae7e310c92666e370b291
[icinga2] / lib / icinga / CMakeLists.txt
1 # Icinga 2
2 # Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)
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 mkembedconfig_target(icinga-itl.conf icinga-itl.cpp)
41
42 set(icinga_SOURCES
43   apiactions.cpp apievents.cpp checkable.cpp checkable.thpp checkable-dependency.cpp checkable-downtime.cpp checkable-event.cpp
44   checkable-flapping.cpp checkable-script.cpp checkcommand.cpp checkcommand.thpp checkresult.cpp checkresult.thpp
45   cib.cpp clusterevents.cpp command.cpp command.thpp comment.cpp comment.thpp compatutility.cpp dependency.cpp dependency.thpp
46   dependency-apply.cpp downtime.cpp downtime.thpp eventcommand.cpp eventcommand.thpp
47   externalcommandprocessor.cpp host.cpp host.thpp hostgroup.cpp hostgroup.thpp icingaapplication.cpp icingaapplication.thpp
48   icinga-itl.cpp customvarobject.cpp customvarobject.thpp
49   legacytimeperiod.cpp macroprocessor.cpp notificationcommand.cpp notificationcommand.thpp notification.cpp notification.thpp
50   notification-apply.cpp objectutils.cpp perfdatavalue.cpp perfdatavalue.thpp pluginutility.cpp scheduleddowntime.cpp scheduleddowntime.thpp
51   scheduleddowntime-apply.cpp service-apply.cpp checkable-check.cpp checkable-comment.cpp
52   service.cpp service.thpp servicegroup.cpp servicegroup.thpp checkable-notification.cpp timeperiod.cpp timeperiod.thpp
53   user.cpp user.thpp usergroup.cpp usergroup.thpp
54 )
55
56 if(ICINGA2_UNITY_BUILD)
57     mkunity_target(icinga icinga icinga_SOURCES)
58 endif()
59
60 add_library(icinga SHARED ${icinga_SOURCES})
61
62 target_link_libraries(icinga ${Boost_LIBRARIES} base config remote)
63
64 set_target_properties (
65   icinga PROPERTIES
66   INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
67   DEFINE_SYMBOL I2_ICINGA_BUILD
68   FOLDER Lib
69   VERSION ${SPEC_VERSION}
70 )
71
72 install(
73   TARGETS icinga
74   RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
75   LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/icinga2
76 )
77
78