2019-02-25 15:09:36 +01:00
|
|
|
# Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
|
2013-11-03 13:45:26 +01:00
|
|
|
|
2018-01-18 13:50:38 +01:00
|
|
|
mkclass_target(application.ti application-ti.cpp application-ti.hpp)
|
|
|
|
mkclass_target(configobject.ti configobject-ti.cpp configobject-ti.hpp)
|
2018-08-09 15:37:23 +02:00
|
|
|
mkclass_target(configuration.ti configuration-ti.cpp configuration-ti.hpp)
|
2018-01-18 13:50:38 +01:00
|
|
|
mkclass_target(datetime.ti datetime-ti.cpp datetime-ti.hpp)
|
|
|
|
mkclass_target(filelogger.ti filelogger-ti.cpp filelogger-ti.hpp)
|
|
|
|
mkclass_target(function.ti function-ti.cpp function-ti.hpp)
|
|
|
|
mkclass_target(logger.ti logger-ti.cpp logger-ti.hpp)
|
|
|
|
mkclass_target(perfdatavalue.ti perfdatavalue-ti.cpp perfdatavalue-ti.hpp)
|
|
|
|
mkclass_target(streamlogger.ti streamlogger-ti.cpp streamlogger-ti.hpp)
|
|
|
|
mkclass_target(sysloglogger.ti sysloglogger-ti.cpp sysloglogger-ti.hpp)
|
2013-11-03 13:45:26 +01:00
|
|
|
|
2014-08-30 18:08:28 +02:00
|
|
|
set(base_SOURCES
|
2017-12-24 08:18:33 +01:00
|
|
|
i2-base.hpp
|
2018-08-10 10:15:41 +02:00
|
|
|
application.cpp application.hpp application-ti.hpp application-version.cpp application-environment.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
array.cpp array.hpp array-script.cpp
|
2019-07-16 11:28:20 +02:00
|
|
|
atomic.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
base64.cpp base64.hpp
|
|
|
|
boolean.cpp boolean.hpp boolean-script.cpp
|
2018-01-18 13:50:38 +01:00
|
|
|
configobject.cpp configobject.hpp configobject-ti.hpp configobject-script.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
configtype.cpp configtype.hpp
|
2018-08-09 15:37:23 +02:00
|
|
|
configuration.cpp configuration.hpp configuration-ti.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
configwriter.cpp configwriter.hpp
|
|
|
|
console.cpp console.hpp
|
|
|
|
context.cpp context.hpp
|
|
|
|
convert.cpp convert.hpp
|
2018-01-18 13:50:38 +01:00
|
|
|
datetime.cpp datetime.hpp datetime-ti.hpp datetime-script.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
debug.hpp
|
|
|
|
debuginfo.cpp debuginfo.hpp
|
|
|
|
dependencygraph.cpp dependencygraph.hpp
|
|
|
|
dictionary.cpp dictionary.hpp dictionary-script.cpp
|
|
|
|
exception.cpp exception.hpp
|
|
|
|
fifo.cpp fifo.hpp
|
2018-01-18 13:50:38 +01:00
|
|
|
filelogger.cpp filelogger.hpp filelogger-ti.hpp
|
|
|
|
function.cpp function.hpp function-ti.hpp function-script.cpp functionwrapper.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
initialize.cpp initialize.hpp
|
2019-02-08 10:05:24 +01:00
|
|
|
io-engine.cpp io-engine.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
json.cpp json.hpp json-script.cpp
|
2019-02-12 11:47:03 +01:00
|
|
|
lazy-init.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
library.cpp library.hpp
|
|
|
|
loader.cpp loader.hpp
|
2018-01-18 13:50:38 +01:00
|
|
|
logger.cpp logger.hpp logger-ti.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
math-script.cpp
|
|
|
|
netstring.cpp netstring.hpp
|
|
|
|
networkstream.cpp networkstream.hpp
|
2018-08-07 13:55:41 +02:00
|
|
|
namespace.cpp namespace.hpp namespace-script.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
number.cpp number.hpp number-script.cpp
|
|
|
|
object.cpp object.hpp object-script.cpp
|
|
|
|
objectlock.cpp objectlock.hpp
|
2018-06-05 15:01:43 +02:00
|
|
|
object-packer.cpp object-packer.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
objecttype.cpp objecttype.hpp
|
2018-01-18 13:50:38 +01:00
|
|
|
perfdatavalue.cpp perfdatavalue.hpp perfdatavalue-ti.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
primitivetype.cpp primitivetype.hpp
|
|
|
|
process.cpp process.hpp
|
2018-08-02 10:17:04 +02:00
|
|
|
reference.cpp reference.hpp reference-script.cpp
|
2017-12-24 08:18:33 +01:00
|
|
|
registry.hpp
|
|
|
|
ringbuffer.cpp ringbuffer.hpp
|
|
|
|
scriptframe.cpp scriptframe.hpp
|
|
|
|
scriptglobal.cpp scriptglobal.hpp
|
|
|
|
scriptutils.cpp scriptutils.hpp
|
|
|
|
serializer.cpp serializer.hpp
|
2019-07-25 13:51:24 +02:00
|
|
|
shared.hpp
|
2019-07-26 13:04:32 +02:00
|
|
|
shared-object.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
singleton.hpp
|
|
|
|
socket.cpp socket.hpp
|
|
|
|
stacktrace.cpp stacktrace.hpp
|
|
|
|
statsfunction.hpp
|
|
|
|
stdiostream.cpp stdiostream.hpp
|
|
|
|
stream.cpp stream.hpp
|
2018-01-18 13:50:38 +01:00
|
|
|
streamlogger.cpp streamlogger.hpp streamlogger-ti.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
string.cpp string.hpp string-script.cpp
|
2018-01-18 13:50:38 +01:00
|
|
|
sysloglogger.cpp sysloglogger.hpp sysloglogger-ti.hpp
|
2017-12-24 08:18:33 +01:00
|
|
|
tcpsocket.cpp tcpsocket.hpp
|
|
|
|
threadpool.cpp threadpool.hpp
|
|
|
|
timer.cpp timer.hpp
|
|
|
|
tlsstream.cpp tlsstream.hpp
|
|
|
|
tlsutility.cpp tlsutility.hpp
|
|
|
|
type.cpp type.hpp typetype-script.cpp
|
|
|
|
unix.hpp
|
|
|
|
unixsocket.cpp unixsocket.hpp
|
|
|
|
utility.cpp utility.hpp
|
|
|
|
value.cpp value.hpp value-operators.cpp
|
|
|
|
win32.hpp
|
|
|
|
workqueue.cpp workqueue.hpp
|
2013-11-03 13:45:26 +01:00
|
|
|
)
|
|
|
|
|
2014-11-20 09:59:39 +01:00
|
|
|
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/application-version.cpp PROPERTY EXCLUDE_UNITY_BUILD TRUE)
|
|
|
|
|
2014-08-30 18:08:28 +02:00
|
|
|
if(ICINGA2_UNITY_BUILD)
|
2018-01-19 09:18:52 +01:00
|
|
|
mkunity_target(base base base_SOURCES)
|
2014-08-30 18:08:28 +02:00
|
|
|
endif()
|
|
|
|
|
2018-02-27 15:54:58 +01:00
|
|
|
if(HAVE_SYSTEMD)
|
|
|
|
find_path(SYSTEMD_INCLUDE_DIR
|
|
|
|
NAMES systemd/sd-daemon.h
|
|
|
|
HINTS ${SYSTEMD_ROOT_DIR})
|
|
|
|
include_directories(${SYSTEMD_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2018-01-17 04:28:21 +01:00
|
|
|
add_library(base OBJECT ${base_SOURCES})
|
2014-04-14 03:02:33 +02:00
|
|
|
|
2013-11-03 13:45:26 +01:00
|
|
|
include_directories(${icinga2_SOURCE_DIR}/third-party/execvpe)
|
|
|
|
link_directories(${icinga2_BINARY_DIR}/third-party/execvpe)
|
|
|
|
|
|
|
|
include_directories(${icinga2_SOURCE_DIR}/third-party/mmatch)
|
|
|
|
link_directories(${icinga2_BINARY_DIR}/third-party/mmatch)
|
|
|
|
|
2015-02-13 21:02:48 +01:00
|
|
|
include_directories(${icinga2_SOURCE_DIR}/third-party/socketpair)
|
|
|
|
link_directories(${icinga2_BINARY_DIR}/third-party/socketpair)
|
|
|
|
|
2013-11-03 13:45:26 +01:00
|
|
|
set_target_properties (
|
|
|
|
base PROPERTIES
|
|
|
|
FOLDER Lib
|
|
|
|
)
|
|
|
|
|
2018-07-31 11:59:09 +02:00
|
|
|
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_FULL_CACHEDIR}\")")
|
|
|
|
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ICINGA2_FULL_LOGDIR}/crash\")")
|
2014-12-19 09:45:35 +01:00
|
|
|
|
2015-02-02 09:58:38 +01:00
|
|
|
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}" PARENT_SCOPE)
|