From afa164984be5ef2b55e74d91e939b5594873868a Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 22 Nov 2023 10:25:10 +0100 Subject: [PATCH] CMakeLists: Fix OPENSSL_INCLUDE_DIR reference Seems the intention was to always add OPENSSL_INCLUDE_DIR to the zeek_dynamic_plugin_base target, but finding of the OpenSSL package and setting OPENSSL_INCLUDE_DIR happens much later, so this was never functional. Relates to #3408 - this is the fix for Zeek 6.0.3, #3420 is the better fix for the future. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d3da0c900..c095e51b07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,9 +287,6 @@ target_include_directories( zeek_dynamic_plugin_base INTERFACE $ $ $) -if (OPENSSL_INCLUDE_DIR) - target_include_directories(zeek_dynamic_plugin_base INTERFACE "${OPENSSL_INCLUDE_DIR}") -endif () target_link_libraries(zeek_dynamic_plugin_base INTERFACE Threads::Threads) add_library(Zeek::DynamicPluginBase ALIAS zeek_dynamic_plugin_base) set_target_properties(zeek_dynamic_plugin_base PROPERTIES EXPORT_NAME DynamicPluginBase) @@ -1033,6 +1030,9 @@ endif () # --with-openssl (which may be common). include_directories(BEFORE ${OPENSSL_INCLUDE_DIR}) +# Propagate non-standard OpenSSL includes to dynamic plugins. +target_include_directories(zeek_dynamic_plugin_base INTERFACE "${OPENSSL_INCLUDE_DIR}") + # Determine if libfts is external to libc, i.e. musl find_package(FTS) if (FTS_FOUND)