mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Improve CMake variables, update cmake submodule
This commit is contained in:
parent
1d81fb4fb0
commit
12ea6ed478
4 changed files with 14 additions and 11 deletions
|
@ -426,7 +426,6 @@ set(cmake_current_binary_dir "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
set(cmake_install_prefix "${CMAKE_INSTALL_PREFIX}")
|
set(cmake_install_prefix "${CMAKE_INSTALL_PREFIX}")
|
||||||
set(cmake_source_dir "${CMAKE_SOURCE_DIR}")
|
set(cmake_source_dir "${CMAKE_SOURCE_DIR}")
|
||||||
set(zeek_script_install_path "${ZEEK_SCRIPT_INSTALL_PATH}")
|
set(zeek_script_install_path "${ZEEK_SCRIPT_INSTALL_PATH}")
|
||||||
set(ZEEK_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/zeek/cmake")
|
|
||||||
if ( MSVC )
|
if ( MSVC )
|
||||||
string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" bro_plugin_install_path "${bro_plugin_install_path}")
|
string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" bro_plugin_install_path "${bro_plugin_install_path}")
|
||||||
string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" cmake_binary_dir "${cmake_binary_dir}")
|
string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" cmake_binary_dir "${cmake_binary_dir}")
|
||||||
|
@ -436,6 +435,9 @@ if ( MSVC )
|
||||||
string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" zeek_script_install_path "${zeek_script_install_path}")
|
string(REGEX REPLACE "^([A-Za-z]):/(.*)" "/\\1/\\2" zeek_script_install_path "${zeek_script_install_path}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# Set the path where we install the ZeekConfig.cmake file and related files.
|
||||||
|
set(ZEEK_CMAKE_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/zeek/cmake")
|
||||||
|
|
||||||
if ( NOT ZEEK_ETC_INSTALL_DIR )
|
if ( NOT ZEEK_ETC_INSTALL_DIR )
|
||||||
set(ZEEK_ETC_INSTALL_DIR ${ZEEK_ROOT_DIR}/etc)
|
set(ZEEK_ETC_INSTALL_DIR ${ZEEK_ROOT_DIR}/etc)
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -502,6 +504,7 @@ string(REGEX REPLACE "[^a-zA-Z0-9_\$]" "_" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
||||||
if(ENABLE_DEBUG)
|
if(ENABLE_DEBUG)
|
||||||
set(VERSION_C_IDENT "${VERSION_C_IDENT}_debug")
|
set(VERSION_C_IDENT "${VERSION_C_IDENT}_debug")
|
||||||
target_compile_definitions(zeek_internal INTERFACE DEBUG)
|
target_compile_definitions(zeek_internal INTERFACE DEBUG)
|
||||||
|
target_compile_definitions(zeek_dynamic_plugin_base INTERFACE DEBUG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ( NOT BINARY_PACKAGING_MODE )
|
if ( NOT BINARY_PACKAGING_MODE )
|
||||||
|
@ -1291,7 +1294,7 @@ configure_file(src/ZeekPluginConfig.cmake.in ZeekPluginConfig.cmake @ONLY)
|
||||||
configure_package_config_file(
|
configure_package_config_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/ZeekConfig.cmake.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/src/ZeekConfig.cmake.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfig.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfig.cmake"
|
||||||
INSTALL_DESTINATION "${ZEEK_CMAKE_INSTALL_DIR}")
|
INSTALL_DESTINATION "${ZEEK_CMAKE_CONFIG_DIR}")
|
||||||
write_basic_package_version_file(
|
write_basic_package_version_file(
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfigVersion.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfigVersion.cmake"
|
||||||
VERSION ${ZEEK_VERSION_NUMBER}
|
VERSION ${ZEEK_VERSION_NUMBER}
|
||||||
|
@ -1303,18 +1306,18 @@ export(EXPORT ZeekTargets FILE ZeekTargets.cmake NAMESPACE Zeek::)
|
||||||
# Write the bootstrap file for dynamic plugins. Needed by ZeekPlugin.cmake.
|
# Write the bootstrap file for dynamic plugins. Needed by ZeekPlugin.cmake.
|
||||||
configure_file(src/ZeekPluginBootstrap.cmake.in ZeekPluginBootstrap.cmake @ONLY)
|
configure_file(src/ZeekPluginBootstrap.cmake.in ZeekPluginBootstrap.cmake @ONLY)
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ZeekPluginBootstrap.cmake"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ZeekPluginBootstrap.cmake"
|
||||||
DESTINATION "${ZEEK_CMAKE_INSTALL_DIR}")
|
DESTINATION "${ZEEK_CMAKE_CONFIG_DIR}")
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfig.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfig.cmake"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfigVersion.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfigVersion.cmake"
|
||||||
DESTINATION
|
DESTINATION
|
||||||
"${ZEEK_CMAKE_INSTALL_DIR}")
|
"${ZEEK_CMAKE_CONFIG_DIR}")
|
||||||
|
|
||||||
install(
|
install(
|
||||||
EXPORT ZeekTargets
|
EXPORT ZeekTargets
|
||||||
DESTINATION "${ZEEK_CMAKE_INSTALL_DIR}"
|
DESTINATION "${ZEEK_CMAKE_CONFIG_DIR}"
|
||||||
NAMESPACE Zeek::)
|
NAMESPACE Zeek::)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit 9d42fed6811d011890af99d5de57c4d0089deaf6
|
Subproject commit ddbea121d75a416cba8db5d8907e89875054579e
|
|
@ -2,14 +2,14 @@
|
||||||
# the CMake configuration step to plugins.
|
# the CMake configuration step to plugins.
|
||||||
|
|
||||||
# Allows scripts such as ZeekPlugin.cmake to locate the Zeek CMake package.
|
# Allows scripts such as ZeekPlugin.cmake to locate the Zeek CMake package.
|
||||||
set(ZEEK_CMAKE_PACKAGE_DIR "@ZEEK_CMAKE_INSTALL_DIR@"
|
set(ZEEK_CMAKE_CONFIG_DIR "@ZEEK_CMAKE_CONFIG_DIR@"
|
||||||
CACHE PATH "Path the CMake package for Zeek." FORCE)
|
CACHE PATH "Internal Zeek variable: the CMake package path for Zeek." FORCE)
|
||||||
|
|
||||||
# Allows scripts to locate files in the Zeek install tree.
|
# Allows scripts to locate files in the Zeek install tree.
|
||||||
set(ZEEK_CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
set(ZEEK_CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||||
CACHE PATH "Path the install prefix of Zeek." FORCE)
|
CACHE PATH "Internal Zeek variable: CMAKE_INSTALL_PREFIX of Zeek." FORCE)
|
||||||
|
|
||||||
# Set ZEEK_PLUGIN_SCRIPTS_PATH for ZeekPlugin.cmake. We install the scripts into
|
# Set ZEEK_PLUGIN_SCRIPTS_PATH for ZeekPlugin.cmake. We install the scripts into
|
||||||
# the package directory.
|
# the package directory.
|
||||||
set(ZEEK_PLUGIN_SCRIPTS_PATH "${ZEEK_CMAKE_PACKAGE_DIR}"
|
set(ZEEK_PLUGIN_SCRIPTS_PATH "${ZEEK_CMAKE_CONFIG_DIR}"
|
||||||
CACHE PATH "Path to utility scripts for building Zeek plugins." FORCE)
|
CACHE PATH "Path to utility scripts for building Zeek plugins." FORCE)
|
||||||
|
|
|
@ -4,7 +4,7 @@ binpac_root=@ZEEK_CONFIG_BINPAC_ROOT_DIR@
|
||||||
broker_root=@ZEEK_CONFIG_BROKER_ROOT_DIR@
|
broker_root=@ZEEK_CONFIG_BROKER_ROOT_DIR@
|
||||||
btest_tools_dir=@ZEEK_CONFIG_BTEST_TOOLS_DIR@
|
btest_tools_dir=@ZEEK_CONFIG_BTEST_TOOLS_DIR@
|
||||||
build_type=@CMAKE_BUILD_TYPE_LOWER@
|
build_type=@CMAKE_BUILD_TYPE_LOWER@
|
||||||
cmake_dir=@ZEEK_CMAKE_INSTALL_DIR@
|
cmake_dir=@ZEEK_CMAKE_CONFIG_DIR@
|
||||||
config_dir=@ZEEK_ETC_INSTALL_DIR@
|
config_dir=@ZEEK_ETC_INSTALL_DIR@
|
||||||
have_spicy=@USE_SPICY_ANALYZERS@
|
have_spicy=@USE_SPICY_ANALYZERS@
|
||||||
include_dir=@CMAKE_INSTALL_PREFIX@/include
|
include_dir=@CMAKE_INSTALL_PREFIX@/include
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue