mirror of https://github.com/Icinga/icinga2.git
parent
196bd89c7a
commit
05d642f69d
|
@ -80,6 +80,14 @@ include_directories(${Boost_INCLUDE_DIRS})
|
|||
find_package(OpenSSL REQUIRED)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
find_package(YAJL)
|
||||
|
||||
if(NOT YAJL_FOUND)
|
||||
include_directories(${icinga2_BINARY_DIR}/third-party/yajl/include)
|
||||
link_directories(${icinga2_BINARY_DIR}/third-party/yajl)
|
||||
set(YAJL_LIBRARIES "yajl")
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib
|
||||
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/lib
|
||||
|
|
|
@ -28,6 +28,7 @@ parentheses):
|
|||
* recommended: libexecinfo on FreeBSD
|
||||
* optional: MySQL (mysql-devel on RHEL, libmysqlclient-dev on Debian)
|
||||
* optional: PostgreSQL (postgresql-devel on RHEL, libpq-dev on Debian)
|
||||
* optional: YAJL (yajl-devel on RHEL, libyajl-dev on Debian)
|
||||
|
||||
Note: RHEL5 ships an ancient flex version. Updated packages are available for
|
||||
example from the repoforge buildtools repository.
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
# - Try to find libyajl
|
||||
# Once done this will define
|
||||
# YAJL_FOUND - System has YAJL
|
||||
# YAJL_INCLUDE_DIRS - The YAJL include directories
|
||||
# YAJL_LIBRARIES - The libraries needed to use YAJL
|
||||
# YAJL_DEFINITIONS - Compiler switches required for using YAJL
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_YAJL QUIET yajl)
|
||||
set(YAJL_DEFINITIONS ${PC_YAJL_CFLAGS_OTHER})
|
||||
|
||||
find_path(YAJL_INCLUDE_DIR yajl/yajl_parse.h
|
||||
HINTS ${PC_YAJL_INCLUDEDIR} ${PC_YAJL_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES libyajl)
|
||||
|
||||
find_library(YAJL_LIBRARY NAMES yajl libyajl
|
||||
HINTS ${PC_YAJL_LIBDIR} ${PC_YAJL_LIBRARY_DIRS})
|
||||
|
||||
set(YAJL_LIBRARIES ${YAJL_LIBRARY} )
|
||||
set(YAJL_INCLUDE_DIRS ${YAJL_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set YAJL_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(yajl DEFAULT_MSG
|
||||
YAJL_LIBRARY YAJL_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(YAJL_INCLUDE_DIR YAJL_LIBRARY)
|
|
@ -19,6 +19,7 @@ Build-Depends: bison,
|
|||
libmysqlclient-dev,
|
||||
libpq-dev,
|
||||
libssl-dev,
|
||||
libyajl-dev,
|
||||
make (>= 3.81),
|
||||
po-debconf
|
||||
Standards-Version: 3.9.5
|
||||
|
|
|
@ -41,7 +41,7 @@ endif()
|
|||
|
||||
add_library(base SHARED ${base_SOURCES})
|
||||
|
||||
target_link_libraries(base ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} mmatch yajl)
|
||||
target_link_libraries(base ${CMAKE_DL_LIBS} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${YAJL_LIBRARIES} mmatch)
|
||||
|
||||
if(HAVE_LIBEXECINFO)
|
||||
target_link_libraries(base execinfo)
|
||||
|
@ -56,9 +56,6 @@ link_directories(${icinga2_BINARY_DIR}/third-party/execvpe)
|
|||
include_directories(${icinga2_SOURCE_DIR}/third-party/mmatch)
|
||||
link_directories(${icinga2_BINARY_DIR}/third-party/mmatch)
|
||||
|
||||
include_directories(${icinga2_BINARY_DIR}/third-party/yajl/include)
|
||||
link_directories(${icinga2_BINARY_DIR}/third-party/yajl)
|
||||
|
||||
if(UNIX OR CYGWIN)
|
||||
target_link_libraries(base execvpe)
|
||||
endif()
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
add_subdirectory(mmatch)
|
||||
add_subdirectory(yajl)
|
||||
|
||||
if(NOT YAJL_FOUND)
|
||||
add_subdirectory(yajl)
|
||||
endif()
|
||||
|
||||
if(UNIX OR CYGWIN)
|
||||
add_subdirectory(execvpe)
|
||||
|
|
Loading…
Reference in New Issue