mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Update to latest Broker without public CAF dep
This commit is contained in:
parent
e93fcd3c64
commit
56f30b500a
32 changed files with 328 additions and 1064 deletions
|
@ -321,36 +321,15 @@ if ( PYTHON_VERSION_STRING VERSION_LESS ${ZEEK_PYTHON_MIN} )
|
|||
message(FATAL_ERROR "Python ${ZEEK_PYTHON_MIN} or greater is required.")
|
||||
endif ()
|
||||
|
||||
if ( CAF_ROOT OR BROKER_ROOT_DIR )
|
||||
# TODO: drop < 3.12 compatibility check when raising the minimum CMake version
|
||||
if ( CAF_ROOT AND CMAKE_VERSION VERSION_LESS 3.12 )
|
||||
find_package(CAF ${CAF_VERSION_MIN_REQUIRED} REQUIRED
|
||||
COMPONENTS openssl test io core
|
||||
PATHS "${CAF_ROOT}")
|
||||
else ()
|
||||
find_package(CAF ${CAF_VERSION_MIN_REQUIRED} REQUIRED
|
||||
COMPONENTS openssl test io core)
|
||||
endif ()
|
||||
message(STATUS "Using system CAF version ${CAF_VERSION}")
|
||||
# TODO: drop these legacy variables and simply use the targets consistently
|
||||
set(CAF_LIBRARIES CAF::core CAF::io CAF::openssl CACHE INTERNAL "")
|
||||
set(caf_dirs "")
|
||||
foreach (caf_lib IN LISTS CAF_LIBRARIES ITEMS CAF::test)
|
||||
get_target_property(dirs ${caf_lib} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
if ( dirs )
|
||||
list(APPEND caf_dirs ${dirs})
|
||||
endif ()
|
||||
endforeach ()
|
||||
list(REMOVE_DUPLICATES caf_dirs)
|
||||
list(GET caf_dirs 0 caf_dir)
|
||||
set(CAF_INCLUDE_DIRS "${caf_dirs}" CACHE INTERNAL "")
|
||||
endif ()
|
||||
|
||||
add_subdirectory(auxil/paraglob)
|
||||
set(zeekdeps ${zeekdeps} paraglob)
|
||||
|
||||
if ( BROKER_ROOT_DIR )
|
||||
find_package(Broker REQUIRED)
|
||||
if ( Broker_ROOT )
|
||||
find_package(Broker REQUIRED PATHS "${Broker_ROOT}")
|
||||
set(zeekdeps ${zeekdeps} ${BROKER_LIBRARY})
|
||||
set(broker_includes ${BROKER_INCLUDE_DIR})
|
||||
elseif ( BROKER_ROOT_DIR )
|
||||
find_package(Broker REQUIRED PATHS "${BROKER_ROOT_DIR}")
|
||||
set(zeekdeps ${zeekdeps} ${BROKER_LIBRARY})
|
||||
set(broker_includes ${BROKER_INCLUDE_DIR})
|
||||
else ()
|
||||
|
@ -375,11 +354,6 @@ else ()
|
|||
set(broker_includes ${CMAKE_CURRENT_SOURCE_DIR}/auxil/broker/include ${CMAKE_CURRENT_BINARY_DIR}/auxil/broker/include)
|
||||
endif ()
|
||||
|
||||
# CAF_LIBRARIES and CAF_INCLUDE_DIRS are defined either by calling
|
||||
# find_package(CAF) or by calling add_subdirectory(auxil/broker). In either case,
|
||||
# we have to care about CAF here because Broker headers can pull in CAF
|
||||
# headers.
|
||||
set(zeekdeps ${zeekdeps} ${CAF_LIBRARIES})
|
||||
include_directories(BEFORE
|
||||
${PCAP_INCLUDE_DIR}
|
||||
${BIND_INCLUDE_DIR}
|
||||
|
@ -452,7 +426,7 @@ endif ()
|
|||
# Any headers that are possibly bundled in the Zeek source-tree and that are supposed
|
||||
# to have priority over any pre-existing/system-wide headers need to appear early in
|
||||
# compiler search path.
|
||||
include_directories(BEFORE ${broker_includes} ${CAF_INCLUDE_DIRS})
|
||||
include_directories(BEFORE ${broker_includes})
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/auxil/highwayhash)
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/auxil/paraglob/include)
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/auxil/rapidjson/include)
|
||||
|
@ -512,12 +486,6 @@ execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
|
|||
"."
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/zeek")
|
||||
|
||||
if ( CAF_ROOT )
|
||||
set(ZEEK_CONFIG_CAF_ROOT_DIR ${CAF_ROOT})
|
||||
else ()
|
||||
set(ZEEK_CONFIG_CAF_ROOT_DIR ${ZEEK_ROOT_DIR})
|
||||
endif ()
|
||||
|
||||
if ( BinPAC_ROOT_DIR )
|
||||
set(ZEEK_CONFIG_BINPAC_ROOT_DIR ${BinPAC_ROOT_DIR})
|
||||
else ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue