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.
|
|
|
|
|
2013-11-03 12:40:39 +01:00
|
|
|
find_package(BISON 2.3.0 REQUIRED)
|
2013-11-21 11:22:51 +01:00
|
|
|
find_package(FLEX 2.5.31 REQUIRED)
|
2013-11-03 13:45:26 +01:00
|
|
|
|
|
|
|
bison_target(config_parser config_parser.yy ${CMAKE_CURRENT_BINARY_DIR}/config_parser.cc)
|
|
|
|
flex_target(config_lexer config_lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/config_lexer.cc)
|
|
|
|
add_flex_bison_dependency(config_lexer config_parser)
|
|
|
|
|
|
|
|
mkembedconfig_target(base-type.conf base-type.cpp)
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
add_library(config SHARED
|
2014-03-22 10:29:45 +01:00
|
|
|
aexpression.cpp applyrule.cpp base-type.conf base-type.cpp
|
2014-03-21 15:39:25 +01:00
|
|
|
configcompilercontext.cpp configcompiler.cpp configerror.cpp configitembuilder.cpp
|
2013-11-03 13:45:26 +01:00
|
|
|
configitem.cpp ${FLEX_config_lexer_OUTPUTS} ${BISON_config_parser_OUTPUTS}
|
2014-04-23 12:44:36 +02:00
|
|
|
configtype.cpp debuginfo.cpp objectrule.cpp typerule.cpp typerulelist.cpp
|
2013-11-03 13:45:26 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(config ${Boost_LIBRARIES} base)
|
|
|
|
|
|
|
|
set_target_properties (
|
|
|
|
config PROPERTIES
|
|
|
|
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
|
|
|
|
DEFINE_SYMBOL I2_CONFIG_BUILD
|
|
|
|
FOLDER Lib
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS config
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/icinga2
|
|
|
|
)
|