From e1ba20a878100ab63ab9f65de37d7f2908619381 Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Wed, 27 Mar 2024 16:12:10 -0700 Subject: [PATCH 1/3] Fix a typo in CMakeLists.txt when building Zeek as a library This caused an error at configuration time since zeek_lie isn't a thing. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7d7a23816..665a5804f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,7 +243,7 @@ if (TARGET zeek_lib) add_dependencies(zeek_lib zeek_autogen_files) set_target_properties(zeek_lib PROPERTIES RUNTIME_OUTPUT_NAME libzeek) if (NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) - set_target_properties(zeek_lie PROPERTIES LIBRARY_OUTPUT_DIRECTORY src) + set_target_properties(zeek_lib PROPERTIES LIBRARY_OUTPUT_DIRECTORY src) endif () install(TARGETS zeek_lib LIBRARY DESTINATION lib) # Tell zeek_target_link_libraries to add library dependencies as PRIVATE. From 602b1f88fbc053752fff1cacd48788257ce71ab2 Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Wed, 27 Mar 2024 16:21:55 -0700 Subject: [PATCH 2/3] When configuring Spicy, be prepated for zeek_lib or zeek_exe targets. This avoids a configuration error where zeek_exe is not defined (i.e. when building (only) as a library). It anticipates building both the executable and the library, which we used to do when using Conan but currently don't. --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 665a5804f3..6452cd5bf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -962,8 +962,14 @@ if (NOT DISABLE_SPICY) hilti_link_object_libraries_in_tree(zeek_exe PRIVATE) spicy_link_object_libraries_in_tree(zeek_exe PRIVATE) else () - hilti_link_libraries_in_tree(zeek_exe PRIVATE) - spicy_link_libraries_in_tree(zeek_exe PRIVATE) + if (TARGET zeek_exe) + hilti_link_libraries_in_tree(zeek_exe PRIVATE) + spicy_link_libraries_in_tree(zeek_exe PRIVATE) + endif () + if (TARGET zeek_lib) + hilti_link_libraries_in_tree(zeek_lib PRIVATE) + spicy_link_libraries_in_tree(zeek_lib PRIVATE) + endif () endif () set(HAVE_SPICY yes) From 250d913ddae3407a63f0f7882bb47705675b790f Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Wed, 27 Mar 2024 16:40:30 -0700 Subject: [PATCH 3/3] Remove vestigial Conan bit in CMakeLists.txt This is no longer required since we switched Conan to vcpkg a while back. --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6452cd5bf4..891858ac4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,10 +230,6 @@ if (ZEEK_STANDALONE) endif () # Tell zeek_target_link_libraries to add library dependencies as PRIVATE. set(zeek_exe_access PRIVATE) - # Also build the static library when asked for via Conan. - if (CONAN_EXPORTED) - add_library(zeek_lib STATIC) - endif () else () add_library(zeek_lib STATIC) endif ()