mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Change VERSION variable in CMake config to ZEEK_VERSION_FULL
This commit is contained in:
parent
cb649795c0
commit
67c8e5192a
4 changed files with 7 additions and 7 deletions
|
@ -531,7 +531,7 @@ file(
|
|||
"setenv ZEEK_SPICY_LIBRARY_PATH \"${cmake_source_dir}/scripts/spicy\"\n"
|
||||
"setenv SPICY_BUILD_DIRECTORY \"${cmake_binary_dir}/auxil/spicy\"\n")
|
||||
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION LIMIT_COUNT 1)
|
||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" ZEEK_VERSION_FULL LIMIT_COUNT 1)
|
||||
execute_process(
|
||||
COMMAND grep "^constexpr int PLUGIN_API_VERSION"
|
||||
INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/plugin/Plugin.h
|
||||
|
@ -541,7 +541,7 @@ execute_process(
|
|||
string(REGEX MATCH "^constexpr int PLUGIN_API_VERSION = ([0-9]+);" API_VERSION "${API_VERSION}")
|
||||
set(API_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
string(REGEX REPLACE "[.-]" " " version_numbers ${VERSION})
|
||||
string(REGEX REPLACE "[.-]" " " version_numbers ${ZEEK_VERSION_FULL})
|
||||
separate_arguments(version_numbers)
|
||||
list(GET version_numbers 0 VERSION_MAJOR)
|
||||
list(GET version_numbers 1 VERSION_MINOR)
|
||||
|
@ -550,7 +550,7 @@ set(VERSION_MAJ_MIN "${VERSION_MAJOR}.${VERSION_MINOR}")
|
|||
math(EXPR ZEEK_VERSION_NUMBER
|
||||
"${VERSION_MAJOR} * 10000 + ${VERSION_MINOR} * 100 + ${VERSION_PATCH}")
|
||||
|
||||
set(VERSION_C_IDENT "${VERSION}_plugin_${API_VERSION}")
|
||||
set(VERSION_C_IDENT "${ZEEK_VERSION_FULL}_plugin_${API_VERSION}")
|
||||
string(REGEX REPLACE "-[0-9]*$" "_git" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
||||
string(REGEX REPLACE "[^a-zA-Z0-9_\$]" "_" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
||||
|
||||
|
@ -1288,7 +1288,7 @@ endif ()
|
|||
# has already configured packaging
|
||||
if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
||||
include(ConfigurePackaging)
|
||||
ConfigurePackaging(${VERSION})
|
||||
ConfigurePackaging(${ZEEK_VERSION_FULL})
|
||||
endif ()
|
||||
|
||||
# Refers back to the "distribution prefix". This is the source tree when
|
||||
|
|
|
@ -14,7 +14,7 @@ prefix="@CMAKE_INSTALL_PREFIX@"
|
|||
python_dir="@PY_MOD_INSTALL_DIR@"
|
||||
script_dir="@ZEEK_SCRIPT_INSTALL_PATH@"
|
||||
site_dir="@ZEEK_SCRIPT_INSTALL_PATH@/site"
|
||||
version="@VERSION@"
|
||||
version="@ZEEK_VERSION_FULL@"
|
||||
zeek_dist="@ZEEK_DIST@"
|
||||
zeekpath="@DEFAULT_ZEEKPATH@"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#pragma once
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "@VERSION@"
|
||||
#define VERSION "@ZEEK_VERSION_FULL@"
|
||||
|
||||
// Zeek version number.
|
||||
// This is the result of (major * 10000 + minor * 100 + patch)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
#include "zeek/zeek-version.h"
|
||||
|
||||
char version[] = "@VERSION@";
|
||||
char version[] = "@ZEEK_VERSION_FULL@";
|
||||
|
||||
// A C function that has the current version built into its name.
|
||||
// One can link a shared library against this to ensure that it won't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue