Expose a configure-time option to set the plugin path.

I believe that this is the last option presented during the build summary which wasn't available to be set by the user.
This commit is contained in:
Vlad Grigorescu 2021-03-12 21:22:01 -06:00
parent c9c0fea8d0
commit 4557b0907c
2 changed files with 12 additions and 2 deletions

View file

@ -56,8 +56,14 @@ get_filename_component(ZEEK_SCRIPT_INSTALL_PATH ${ZEEK_SCRIPT_INSTALL_PATH}
# A folder for library-like Zeek-specific things: Python modules, Zeek # A folder for library-like Zeek-specific things: Python modules, Zeek
# plugins, etc. # plugins, etc.
set(ZEEK_LIBDIR_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/zeek) set(ZEEK_LIBDIR_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/zeek)
if (ZEEK_PLUGIN_DIR)
set(BRO_PLUGIN_INSTALL_PATH ${ZEEK_PLUGIN_DIR}
CACHE STRING "Installation path for plugins" FORCE)
else ()
set(BRO_PLUGIN_INSTALL_PATH ${ZEEK_LIBDIR_PATH}/plugins set(BRO_PLUGIN_INSTALL_PATH ${ZEEK_LIBDIR_PATH}/plugins
CACHE STRING "Installation path for plugins" FORCE) CACHE STRING "Installation path for plugins" FORCE)
endif ()
configure_file(zeek-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev) configure_file(zeek-path-dev.in ${CMAKE_CURRENT_BINARY_DIR}/zeek-path-dev)
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink

4
configure vendored
View file

@ -41,6 +41,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--logdir=PATH when using ZeekControl, path to store log file --logdir=PATH when using ZeekControl, path to store log file
[PREFIX/logs] [PREFIX/logs]
--libdir=PATH installation directory for library files [PREFIX/lib] --libdir=PATH installation directory for library files [PREFIX/lib]
--plugindir=PATH installation directory for plugins [LIBDIR/zeek/plugin]
--conf-files-dir=PATH config files installation directory [PREFIX/etc] --conf-files-dir=PATH config files installation directory [PREFIX/etc]
--mandir=PATH installation path for man pages [PREFIX/share/man] --mandir=PATH installation path for man pages [PREFIX/share/man]
--python-dir=PATH explicit installation directory for Python modules --python-dir=PATH explicit installation directory for Python modules
@ -213,6 +214,9 @@ while [ $# -ne 0 ]; do
--libdir=*) --libdir=*)
append_cache_entry CMAKE_INSTALL_LIBDIR PATH $optarg append_cache_entry CMAKE_INSTALL_LIBDIR PATH $optarg
;; ;;
--plugindir=*)
append_cache_entry ZEEK_PLUGIN_DIR PATH $optarg
;;
--python-dir=*) --python-dir=*)
append_cache_entry ZEEK_PYTHON_DIR PATH $optarg append_cache_entry ZEEK_PYTHON_DIR PATH $optarg
;; ;;