bifcl: Only adding subdir if running standalone

This commit is contained in:
Tomer Lev 2022-10-26 17:43:39 +03:00 committed by Tim Wojtulewicz
parent c6042154b9
commit 4352f0c0bb

View file

@ -53,6 +53,11 @@ set(bifcl_SRCS
add_executable(bifcl ${bifcl_SRCS}) add_executable(bifcl ${bifcl_SRCS})
if (MSVC) 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) target_link_libraries(bifcl PRIVATE libunistd)
endif() endif()