2013-11-03 13:45:26 +01:00
|
|
|
# Icinga 2
|
2014-03-19 01:02:29 +01:00
|
|
|
# Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org)
|
2013-11-03 13:45:26 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
2014-05-25 16:23:35 +02:00
|
|
|
mkclass_target(application.ti application.thpp)
|
|
|
|
mkclass_target(dynamicobject.ti dynamicobject.thpp)
|
|
|
|
mkclass_target(filelogger.ti filelogger.thpp)
|
|
|
|
mkclass_target(logger.ti logger.thpp)
|
|
|
|
mkclass_target(streamlogger.ti streamlogger.thpp)
|
|
|
|
mkclass_target(sysloglogger.ti sysloglogger.thpp)
|
2013-11-03 13:45:26 +01:00
|
|
|
|
2014-08-30 18:08:28 +02:00
|
|
|
set(base_SOURCES
|
2014-10-06 14:21:18 +02:00
|
|
|
application.cpp application.thpp array.cpp clicommand.cpp configerror.cpp context.cpp
|
2014-09-09 14:49:21 +02:00
|
|
|
convert.cpp debuginfo.cpp dictionary.cpp dynamicobject.cpp dynamicobject.thpp dynamictype.cpp
|
2014-05-25 16:23:35 +02:00
|
|
|
exception.cpp fifo.cpp filelogger.cpp filelogger.thpp logger.cpp logger.thpp
|
2013-12-16 17:05:23 +01:00
|
|
|
netstring.cpp networkstream.cpp object.cpp objectlock.cpp process.cpp
|
2014-04-21 14:39:35 +02:00
|
|
|
qstring.cpp ringbuffer.cpp scriptfunction.cpp scriptfunctionwrapper.cpp
|
|
|
|
scriptutils.cpp scriptvariable.cpp serializer.cpp socket.cpp stacktrace.cpp
|
2014-05-25 16:23:35 +02:00
|
|
|
statsfunction.cpp stdiostream.cpp stream.cpp streamlogger.cpp streamlogger.thpp
|
|
|
|
sysloglogger.cpp sysloglogger.thpp tcpsocket.cpp threadpool.cpp timer.cpp
|
2013-12-16 17:05:23 +01:00
|
|
|
tlsstream.cpp tlsutility.cpp type.cpp unixsocket.cpp utility.cpp value.cpp
|
2014-05-09 10:23:54 +02:00
|
|
|
value-operators.cpp workqueue.cpp
|
2013-11-03 13:45:26 +01:00
|
|
|
)
|
|
|
|
|
2014-08-30 18:08:28 +02:00
|
|
|
if(ICINGA2_UNITY_BUILD)
|
|
|
|
mkunity_target(base base_SOURCES)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(base SHARED ${base_SOURCES})
|
|
|
|
|
2013-11-04 09:38:13 +01:00
|
|
|
target_link_libraries(base ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cJSON mmatch)
|
2013-11-03 13:45:26 +01:00
|
|
|
|
2014-04-14 03:02:33 +02:00
|
|
|
if(HAVE_LIBEXECINFO)
|
2014-08-30 18:08:28 +02:00
|
|
|
target_link_libraries(base execinfo)
|
2014-04-14 03:02:33 +02:00
|
|
|
endif()
|
|
|
|
|
2013-11-03 13:45:26 +01:00
|
|
|
include_directories(${icinga2_SOURCE_DIR}/third-party/cJSON)
|
|
|
|
link_directories(${icinga2_BINARY_DIR}/third-party/cJSON)
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
if(UNIX OR CYGWIN)
|
|
|
|
target_link_libraries(base execvpe)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(base ws2_32 dbghelp shlwapi)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set_target_properties (
|
|
|
|
base PROPERTIES
|
|
|
|
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
|
|
|
|
DEFINE_SYMBOL I2_BASE_BUILD
|
|
|
|
FOLDER Lib
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS base
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/icinga2
|
|
|
|
)
|