From 4352f0c0bbb3f699766b833c1c66ae0a901b1b67 Mon Sep 17 00:00:00 2001 From: Tomer Lev Date: Wed, 26 Oct 2022 17:43:39 +0300 Subject: [PATCH] bifcl: Only adding subdir if running standalone --- tools/bifcl/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/bifcl/CMakeLists.txt b/tools/bifcl/CMakeLists.txt index 75929d0f13..e8b8c0d3d5 100644 --- a/tools/bifcl/CMakeLists.txt +++ b/tools/bifcl/CMakeLists.txt @@ -53,6 +53,11 @@ set(bifcl_SRCS add_executable(bifcl ${bifcl_SRCS}) if (MSVC) + # If building separately from zeek, we need to add the libunistd subdirectory so + # that linking doesn't fail. + if ("${CMAKE_PROJECT_NAME}" STREQUAL "BifCl") + add_subdirectory(auxil/libunistd EXCLUDE_FROM_ALL) + endif() target_link_libraries(bifcl PRIVATE libunistd) endif()