From b324fecc0d247830189ef895dae77531af6bc9dd Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Fri, 28 Feb 2020 17:20:27 -0800 Subject: [PATCH] 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. --- src/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 23a36ff508..c6b6a03eff 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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)