Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/topic/timw/cmake-find-package'
Browse files Browse the repository at this point in the history
* origin/topic/timw/cmake-find-package:
  Remove usage of FindRequiredPackage
  Require CMake 3.15 for consistency with other Zeek projects
  Update submodules for find_package() fixes
  • Loading branch information
timwoj committed Aug 2, 2023
2 parents 625b169 + 6485c04 commit 526e2cf
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 26 deletions.
8 changes: 8 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2.5.0-34 | 2023-08-02 11:35:59 -0700

* Remove usage of FindRequiredPackage (Tim Wojtulewicz, Corelight)

* Require CMake 3.15 for consistency with other Zeek projects (Tim Wojtulewicz, Corelight)

* Update submodules for find_package() fixes (Tim Wojtulewicz, Corelight)

2.5.0-24 | 2023-04-27 12:13:34 +0200

* Multi-logger handling (Arne Welzel, Corelight)
Expand Down
26 changes: 6 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(ZeekControl C CXX)

include(GNUInstallDirs)
Expand All @@ -14,8 +14,6 @@ set(ETC "${ZEEK_ETC_INSTALL_DIR}")
########################################################################
## Dependency Configuration

include(FindRequiredPackage)

if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/auxil/pysubnettree/CMakeLists.txt)
add_subdirectory(auxil/pysubnettree)
set(SUBNETTREE_FOUND true)
Expand All @@ -36,8 +34,9 @@ endif ()

find_package(Zeek)
list(APPEND Python_ADDITIONAL_VERSIONS 3)
FindRequiredPackage(PythonInterp)
FindRequiredPackage(SubnetTree)
set(ZEEKCTL_PYTHON_MIN 3.7.0)
find_package(Python ${ZEEKCTL_PYTHON_MIN} REQUIRED COMPONENTS Interpreter)
find_package(SubnetTree)
find_package(PCAP)

find_program(SENDMAIL sendmail PATHS /usr/sbin)
Expand All @@ -49,22 +48,9 @@ if (NOT SENDMAIL)
set(SENDMAIL /usr/sbin/sendmail)
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(ZEEKCTL_PYTHON_MIN 3.5.0)

if ( PYTHON_VERSION_STRING VERSION_LESS ${ZEEKCTL_PYTHON_MIN} )
message(FATAL_ERROR "Python ${ZEEKCTL_PYTHON_MIN} or greater is required.")
endif ()

if (NOT CMAKE_CROSSCOMPILING)
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sqlite3"
RESULT_VARIABLE PYSQLITE3_IMPORT_RESULT)
execute_process(COMMAND "${Python_EXECUTABLE}" -c "import sqlite3"
RESULT_VARIABLE PYSQLITE3_IMPORT_RESULT)

if ( NOT PYSQLITE3_IMPORT_RESULT EQUAL 0 )
message(FATAL_ERROR "The sqlite3 python module is required to use "
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0-24
2.5.0-34
2 changes: 1 addition & 1 deletion auxil/capstats
Submodule capstats updated 5 files
+10 −0 CHANGES
+2 −10 CMakeLists.txt
+1 −1 README
+1 −1 VERSION
+1 −1 cmake
2 changes: 1 addition & 1 deletion auxil/pysubnettree
Submodule pysubnettree updated 6 files
+10 −0 CHANGES
+12 −51 CMakeLists.txt
+1 −1 README
+1 −1 VERSION
+1 −1 cmake
+2 −6 configure
2 changes: 1 addition & 1 deletion auxil/trace-summary
Submodule trace-summary updated 6 files
+8 −0 CHANGES
+2 −6 CMakeLists.txt
+1 −1 README
+1 −1 VERSION
+1 −1 cmake
+1 −1 trace-summary
2 changes: 1 addition & 1 deletion cmake
2 changes: 1 addition & 1 deletion doc/main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. Note: This file includes further autogenerated ones.
..
.. Version number is filled in automatically.
.. |version| replace:: 2.5.0-24
.. |version| replace:: 2.5.0-34

===========
ZeekControl
Expand Down

0 comments on commit 526e2cf

Please sign in to comment.