]> granicus.if.org Git - icinga2/blob - lib/icinga/CMakeLists.txt
Merge pull request #5265 from Icinga/feature/perfdata-value-base
[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(scheduleddowntime.ti scheduleddowntime.tcpp scheduleddowntime.thpp)
33 mkclass_target(servicegroup.ti servicegroup.tcpp servicegroup.thpp)
34 mkclass_target(service.ti service.tcpp service.thpp)
35 mkclass_target(timeperiod.ti timeperiod.tcpp timeperiod.thpp)
36 mkclass_target(usergroup.ti usergroup.tcpp usergroup.thpp)
37 mkclass_target(user.ti user.tcpp user.thpp)
38
39 mkembedconfig_target(icinga-itl.conf icinga-itl.cpp)
40
41 set(icinga_SOURCES
42   apiactions.cpp apievents.cpp checkable.cpp checkable.thpp checkable-dependency.cpp checkable-downtime.cpp checkable-event.cpp
43   checkable-flapping.cpp checkable-script.cpp checkcommand.cpp checkcommand.thpp checkresult.cpp checkresult.thpp
44   cib.cpp clusterevents.cpp command.cpp command.thpp comment.cpp comment.thpp compatutility.cpp dependency.cpp dependency.thpp
45   dependency-apply.cpp downtime.cpp downtime.thpp eventcommand.cpp eventcommand.thpp
46   externalcommandprocessor.cpp host.cpp host.thpp hostgroup.cpp hostgroup.thpp icingaapplication.cpp icingaapplication.thpp
47   icinga-itl.cpp customvarobject.cpp customvarobject.thpp
48   legacytimeperiod.cpp macroprocessor.cpp notificationcommand.cpp notificationcommand.thpp notification.cpp notification.thpp
49   notification-apply.cpp objectutils.cpp pluginutility.cpp scheduleddowntime.cpp scheduleddowntime.thpp
50   scheduleddowntime-apply.cpp service-apply.cpp checkable-check.cpp checkable-comment.cpp
51   service.cpp service.thpp servicegroup.cpp servicegroup.thpp checkable-notification.cpp timeperiod.cpp timeperiod.thpp
52   user.cpp user.thpp usergroup.cpp usergroup.thpp
53 )
54
55 if(ICINGA2_UNITY_BUILD)
56     mkunity_target(icinga icinga icinga_SOURCES)
57 endif()
58
59 add_library(icinga SHARED ${icinga_SOURCES})
60
61 target_link_libraries(icinga ${Boost_LIBRARIES} base config remote)
62
63 set_target_properties (
64   icinga PROPERTIES
65   INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
66   DEFINE_SYMBOL I2_ICINGA_BUILD
67   FOLDER Lib
68   VERSION ${SPEC_VERSION}
69 )
70
71 install(
72   TARGETS icinga
73   RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
74   LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/icinga2
75 )
76
77