2 # Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org)
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.
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.
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.
18 mkclass_target(application.ti application.thpp)
19 mkclass_target(dynamicobject.ti dynamicobject.thpp)
20 mkclass_target(filelogger.ti filelogger.thpp)
21 mkclass_target(logger.ti logger.thpp)
22 mkclass_target(streamlogger.ti streamlogger.thpp)
23 mkclass_target(sysloglogger.ti sysloglogger.thpp)
26 application.cpp application.thpp array.cpp configerror.cpp console.cpp context.cpp
27 convert.cpp debuginfo.cpp dictionary.cpp dynamicobject.cpp dynamicobject.thpp dynamictype.cpp
28 exception.cpp fifo.cpp filelogger.cpp filelogger.thpp logger.cpp logger.thpp
29 netstring.cpp networkstream.cpp object.cpp objectlock.cpp process.cpp
30 ringbuffer.cpp scriptfunction.cpp scriptfunctionwrapper.cpp
31 scriptutils.cpp scriptvariable.cpp serializer.cpp socket.cpp stacktrace.cpp
32 statsfunction.cpp stdiostream.cpp stream.cpp streamlogger.cpp streamlogger.thpp string.cpp
33 sysloglogger.cpp sysloglogger.thpp tcpsocket.cpp threadpool.cpp timer.cpp
34 tlsstream.cpp tlsutility.cpp type.cpp unixsocket.cpp utility.cpp value.cpp
35 value-operators.cpp workqueue.cpp
38 if(ICINGA2_UNITY_BUILD)
39 mkunity_target(base base_SOURCES)
42 add_library(base SHARED ${base_SOURCES})
44 target_link_libraries(base ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cJSON mmatch)
47 target_link_libraries(base execinfo)
50 include_directories(${icinga2_SOURCE_DIR}/third-party/cJSON)
51 link_directories(${icinga2_BINARY_DIR}/third-party/cJSON)
53 include_directories(${icinga2_SOURCE_DIR}/third-party/execvpe)
54 link_directories(${icinga2_BINARY_DIR}/third-party/execvpe)
56 include_directories(${icinga2_SOURCE_DIR}/third-party/mmatch)
57 link_directories(${icinga2_BINARY_DIR}/third-party/mmatch)
60 target_link_libraries(base execvpe)
64 target_link_libraries(base ws2_32 dbghelp shlwapi)
67 set_target_properties (
69 INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
70 DEFINE_SYMBOL I2_BASE_BUILD
76 RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
77 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/icinga2