GH-831: Fix the "bro" symlink for binary packaging mode

Creating a "bro" symlink inside the build tree was just to support older
packages/plugins that depended on the build tree, but that's never
available to users in the context of binary packages anyway and also has
the negative effect of clobberring what a previous InstallSymlink() call
intended to use for that symlink in binary packaging mode.
This commit is contained in:
Jon Siwek 2020-02-28 17:20:27 -08:00
parent f69aa03923
commit b324fecc0d

View file

@ -357,10 +357,12 @@ set(BRO_EXE zeek
set(BRO_EXE_PATH ${CMAKE_CURRENT_BINARY_DIR}/zeek
CACHE STRING "Path to Zeek executable binary" FORCE)
# Older plugins may still use `bro` in unit tests.
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/../zeek-wrapper.in"
"${CMAKE_CURRENT_BINARY_DIR}/bro")
if ( NOT BINARY_PACKAGING_MODE )
# Older plugins may still use `bro` in unit tests.
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/../zeek-wrapper.in"
"${CMAKE_CURRENT_BINARY_DIR}/bro")
endif ()
# Target to create all the autogenerated files.
add_custom_target(generate_outputs_stage1)