From 6d7a0204c128ee742bb37f3a874300a3d77ddbd0 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 22 Nov 2023 09:40:58 +0100 Subject: [PATCH] zeek_add_plugin: Fix INCLUDE_DIRS INCLUDE_DIRS is allowed for zeek_add_plugin(), but it has not been threaded through to the target. Relates to zeek/zeek#3420. --- ZeekPluginDynamic.cmake | 5 +++++ ZeekPluginStatic.cmake | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ZeekPluginDynamic.cmake b/ZeekPluginDynamic.cmake index dd52a51..7283cba 100644 --- a/ZeekPluginDynamic.cmake +++ b/ZeekPluginDynamic.cmake @@ -81,6 +81,11 @@ function (zeek_add_dynamic_plugin ns name) zeek_next_pac_block(at_end pacInputs pacRemainder ${pacRemainder}) endwhile () + # Add user-defined extra include directories. + if (FN_ARGS_INCLUDE_DIRS) + target_include_directories(${target_name} PRIVATE ${FN_ARGS_INCLUDE_DIRS}) + endif () + # Add user-defined extra dependencies. if (FN_ARGS_DEPENDENCIES) target_link_libraries(${target_name} PUBLIC ${FN_ARGS_DEPENDENCIES}) diff --git a/ZeekPluginStatic.cmake b/ZeekPluginStatic.cmake index b228247..75b1623 100644 --- a/ZeekPluginStatic.cmake +++ b/ZeekPluginStatic.cmake @@ -63,6 +63,11 @@ function (zeek_add_static_plugin ns name) target_include_directories(${target_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) endif () + # Add user-defined extra include directories. + if (FN_ARGS_INCLUDE_DIRS) + target_include_directories(${target_name} PRIVATE ${FN_ARGS_INCLUDE_DIRS}) + endif () + # Add extra dependencies. if (FN_ARGS_DEPENDENCIES) target_link_libraries(${target_name} PUBLIC ${FN_ARGS_DEPENDENCIES})