binpac: Only adding subdir if running standalone

This commit is contained in:
Tomer Lev 2022-10-26 17:45:36 +03:00 committed by Tim Wojtulewicz
parent 9a4e01e634
commit d5f2c9c3a8

View file

@ -106,6 +106,11 @@ set(binpac_SRCS
add_executable(binpac ${binpac_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 "BinPAC")
add_subdirectory(auxil/libunistd EXCLUDE_FROM_ALL)
endif()
target_link_libraries(binpac PRIVATE libunistd)
endif()