mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00

Also now uses CMake's ENABLE_EXPORTS target property for the zeek executable to ensure symbols are visible to plugins. Prior to CMake 3.4, the policy was to export symbols by default for certain platforms, but later versions need either the explicit target property or policy.
19 lines
415 B
CMake
19 lines
415 B
CMake
|
|
project(Zeek-Plugin-Demo-Foo)
|
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
if ( NOT ZEEK_DIST )
|
|
message(FATAL_ERROR "ZEEK_DIST not set")
|
|
endif ()
|
|
|
|
set(CMAKE_MODULE_PATH ${ZEEK_DIST}/cmake)
|
|
|
|
include(ZeekPlugin)
|
|
|
|
zeek_plugin_begin(Demo Foo)
|
|
zeek_plugin_cc(src/Plugin.cc)
|
|
zeek_plugin_cc(src/Foo.cc)
|
|
zeek_plugin_bif(src/events.bif)
|
|
zeek_plugin_pac(src/foo.pac src/foo-protocol.pac src/foo-analyzer.pac)
|
|
zeek_plugin_end()
|