]> granicus.if.org Git - icinga2/blob - lib/perfdata/CMakeLists.txt
Merge pull request #7124 from Icinga/bugfix/namespace-thread-safe
[icinga2] / lib / perfdata / CMakeLists.txt
1 # Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
2
3 mkclass_target(gelfwriter.ti gelfwriter-ti.cpp gelfwriter-ti.hpp)
4 mkclass_target(graphitewriter.ti graphitewriter-ti.cpp graphitewriter-ti.hpp)
5 mkclass_target(influxdbwriter.ti influxdbwriter-ti.cpp influxdbwriter-ti.hpp)
6 mkclass_target(elasticsearchwriter.ti elasticsearchwriter-ti.cpp elasticsearchwriter-ti.hpp)
7 mkclass_target(opentsdbwriter.ti opentsdbwriter-ti.cpp opentsdbwriter-ti.hpp)
8 mkclass_target(perfdatawriter.ti perfdatawriter-ti.cpp perfdatawriter-ti.hpp)
9
10 set(perfdata_SOURCES
11   elasticsearchwriter.cpp elasticsearchwriter.hpp elasticsearchwriter-ti.hpp
12   gelfwriter.cpp gelfwriter.hpp gelfwriter-ti.hpp
13   graphitewriter.cpp graphitewriter.hpp graphitewriter-ti.hpp
14   influxdbwriter.cpp influxdbwriter.hpp influxdbwriter-ti.hpp
15   opentsdbwriter.cpp opentsdbwriter.hpp opentsdbwriter-ti.hpp
16   perfdatawriter.cpp perfdatawriter.hpp perfdatawriter-ti.hpp
17 )
18
19 if(ICINGA2_UNITY_BUILD)
20   mkunity_target(perfdata perfdata perfdata_SOURCES)
21 endif()
22
23 add_library(perfdata OBJECT ${perfdata_SOURCES})
24
25 add_dependencies(perfdata base config icinga)
26
27 set_target_properties (
28   perfdata PROPERTIES
29   FOLDER Components
30 )
31
32 install_if_not_exists(
33   ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/gelf.conf
34   ${ICINGA2_CONFIGDIR}/features-available
35 )
36
37 install_if_not_exists(
38   ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/graphite.conf
39   ${ICINGA2_CONFIGDIR}/features-available
40 )
41
42 install_if_not_exists(
43   ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/influxdb.conf
44   ${ICINGA2_CONFIGDIR}/features-available
45 )
46
47 install_if_not_exists(
48   ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/elasticsearch.conf
49   ${ICINGA2_CONFIGDIR}/features-available
50 )
51
52 install_if_not_exists(
53   ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/opentsdb.conf
54   ${ICINGA2_CONFIGDIR}/features-available
55 )
56
57 install_if_not_exists(
58   ${PROJECT_SOURCE_DIR}/etc/icinga2/features-available/perfdata.conf
59   ${ICINGA2_CONFIGDIR}/features-available
60 )
61
62 install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_FULL_SPOOLDIR}/perfdata\")")
63 install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_FULL_SPOOLDIR}/tmp\")")
64
65 set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}" PARENT_SCOPE)