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
This commit is contained in:
Arne Welzel 2025-08-21 10:19:35 +02:00
parent c9c5959d49
commit ccdbf25d1f

View file

@ -13,8 +13,8 @@ endif ()
install( install(
CODE "execute_process( \ CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \ COMMAND ${CMAKE_COMMAND} -E create_symlink \
${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data \ ../btest/data \
${CMAKE_INSTALL_PREFIX}/share/zeek/tests \ \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/share/zeek/tests \
)") )")
install(DIRECTORY scripts/spicy/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data/Scripts install(DIRECTORY scripts/spicy/ DESTINATION ${ZEEK_CONFIG_BTEST_TOOLS_DIR}/data/Scripts