mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Remove usage of FindRequiredPackage
This commit is contained in:
parent
2ce94e9855
commit
c743be0c54
2 changed files with 12 additions and 31 deletions
|
@ -721,8 +721,6 @@ endif ()
|
||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
# Dependency Configuration
|
# Dependency Configuration
|
||||||
|
|
||||||
include(FindRequiredPackage)
|
|
||||||
|
|
||||||
# Check cache value first to avoid displaying "Found sed" messages everytime
|
# Check cache value first to avoid displaying "Found sed" messages everytime
|
||||||
if (NOT SED_EXE)
|
if (NOT SED_EXE)
|
||||||
find_program(SED_EXE sed)
|
find_program(SED_EXE sed)
|
||||||
|
@ -734,15 +732,16 @@ if (NOT SED_EXE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
list(APPEND Python_ADDITIONAL_VERSIONS 3)
|
list(APPEND Python_ADDITIONAL_VERSIONS 3)
|
||||||
FindRequiredPackage(PythonInterp)
|
set(ZEEK_PYTHON_MIN 3.5.0)
|
||||||
FindRequiredPackage(FLEX)
|
find_package(Python ${ZEEK_PYTHON_MIN} REQUIRED COMPONENTS Interpreter)
|
||||||
FindRequiredPackage(BISON)
|
find_package(FLEX REQUIRED)
|
||||||
FindRequiredPackage(PCAP)
|
find_package(BISON 2.5 REQUIRED)
|
||||||
FindRequiredPackage(OpenSSL)
|
find_package(PCAP REQUIRED)
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
FindRequiredPackage(BIND)
|
find_package(BIND REQUIRED)
|
||||||
endif ()
|
endif ()
|
||||||
FindRequiredPackage(ZLIB)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
if (NOT BINARY_PACKAGING_MODE)
|
if (NOT BINARY_PACKAGING_MODE)
|
||||||
# TODO: Broker seems to always turn on static libraries. We don't want that for Spicy by default.
|
# TODO: Broker seems to always turn on static libraries. We don't want that for Spicy by default.
|
||||||
|
@ -773,7 +772,7 @@ endif ()
|
||||||
if (ZEEK_PYTHON_DIR)
|
if (ZEEK_PYTHON_DIR)
|
||||||
set(py_mod_install_dir ${ZEEK_PYTHON_DIR})
|
set(py_mod_install_dir ${ZEEK_PYTHON_DIR})
|
||||||
elseif (ZEEK_PYTHON_PREFIX)
|
elseif (ZEEK_PYTHON_PREFIX)
|
||||||
set(pyver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
set(pyver ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR})
|
||||||
set(py_mod_install_dir ${ZEEK_PYTHON_PREFIX}/lib/python${pyver}/site-packages)
|
set(py_mod_install_dir ${ZEEK_PYTHON_PREFIX}/lib/python${pyver}/site-packages)
|
||||||
elseif (ZEEK_PYTHON_HOME)
|
elseif (ZEEK_PYTHON_HOME)
|
||||||
set(py_mod_install_dir ${ZEEK_PYTHON_HOME}/lib/python)
|
set(py_mod_install_dir ${ZEEK_PYTHON_HOME}/lib/python)
|
||||||
|
@ -801,7 +800,8 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/auxil/binpac/CMakeLists.txt)
|
||||||
# TODO in ZeekPluginConfig.cmake.in.
|
# TODO in ZeekPluginConfig.cmake.in.
|
||||||
set(BINPAC_EXE_PATH "${CMAKE_BINARY_DIR}/auxil/binpac/src/binpac${CMAKE_EXECUTABLE_SUFFIX}")
|
set(BINPAC_EXE_PATH "${CMAKE_BINARY_DIR}/auxil/binpac/src/binpac${CMAKE_EXECUTABLE_SUFFIX}")
|
||||||
endif ()
|
endif ()
|
||||||
FindRequiredPackage(BinPAC)
|
|
||||||
|
find_package(BinPAC REQUIRED)
|
||||||
|
|
||||||
# Add an alias (used by our plugin setup).
|
# Add an alias (used by our plugin setup).
|
||||||
add_executable(Zeek::BinPAC ALIAS binpac)
|
add_executable(Zeek::BinPAC ALIAS binpac)
|
||||||
|
@ -841,25 +841,6 @@ if (ENABLE_JEMALLOC)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (BISON_VERSION AND BISON_VERSION VERSION_LESS 2.5)
|
|
||||||
set(MISSING_PREREQS true)
|
|
||||||
list(APPEND MISSING_PREREQ_DESCS
|
|
||||||
" Could not find prerequisite package Bison >= 2.5, found: ${BISON_VERSION}")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (MISSING_PREREQS)
|
|
||||||
foreach (prereq ${MISSING_PREREQ_DESCS})
|
|
||||||
message(SEND_ERROR ${prereq})
|
|
||||||
endforeach ()
|
|
||||||
message(FATAL_ERROR "Configuration aborted due to missing prerequisites")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set(ZEEK_PYTHON_MIN 3.5.0)
|
|
||||||
|
|
||||||
if (PYTHON_VERSION_STRING VERSION_LESS ${ZEEK_PYTHON_MIN})
|
|
||||||
message(FATAL_ERROR "Python ${ZEEK_PYTHON_MIN} or greater is required.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_subdirectory(auxil/paraglob)
|
add_subdirectory(auxil/paraglob)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
cmake_policy(SET CMP0079 NEW)
|
cmake_policy(SET CMP0079 NEW)
|
||||||
|
|
|
@ -256,7 +256,7 @@ cmake_policy(POP)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc
|
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
|
COMMAND ${Python_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue