zeek/testing/CMakeLists.txt
Arne Welzel ccdbf25d1f testing: Make share/zeek/tests a relative symlink, prefix with DESTDIR
This create_symlink call would not respect DESTDIR at installation
time, fix proposed by Benjamin. Also make the symlink path relative
instead of absolute for easier relocation of the Zeek installation.

Closes #3266
2025-08-21 10:50:35 +02:00

21 lines
739 B
CMake

install(
DIRECTORY scripts/
DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/scripts
USE_SOURCE_PERMISSIONS FILES_MATCHING
PATTERN "diff-*")
install(FILES btest/random.seed DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data)
if (INSTALL_BTEST_PCAPS)
install(DIRECTORY btest/Traces/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data/pcaps)
endif ()
# The remainder is for backwards-compatability with existing Spicy zkg packages.
install(
CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \
../btest/data \
\$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/share/zeek/tests \
)")
install(DIRECTORY scripts/spicy/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data/Scripts
USE_SOURCE_PERMISSIONS)