From f60c4dc4969671e9779dda59c1f502260a14f69e Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Wed, 4 Jan 2017 23:57:32 +0100 Subject: [PATCH] Add Graphviz version define to config-cmake.h.in This adds the `PACKAGE_VERSION` define, which is used in various parts to print the version number. --- CMakeLists.txt | 8 +++++--- config-cmake.h.in | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea9a32c4f..1458f397f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,10 +42,12 @@ if(NOT git_result EQUAL 0) set(GRAPHVIZ_VERSION_BUILD 0) endif() -message(STATUS "Graphviz version: ${GRAPHVIZ_VERSION_MAJROR}.${GRAPHVIZ_VERSION_MINOR}.${GRAPHVIZ_VERSION_BUILD}") +set(GRAPHVIZ_VERSION_FULL "${GRAPHVIZ_VERSION_MAJROR}.${GRAPHVIZ_VERSION_MINOR}.${GRAPHVIZ_VERSION_BUILD}") -# Check avaiable headers, functions and libraries and write the result to config.h -# ================================================================================ +message(STATUS "Graphviz version: ${GRAPHVIZ_VERSION_FULL}") + +# Generate config.h with proper defines +# ===================================== include(config_checks) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/config-cmake.h.in b/config-cmake.h.in index 6d2dc3d89..dce248e0d 100644 --- a/config-cmake.h.in +++ b/config-cmake.h.in @@ -1,3 +1,6 @@ +// Values +#define PACKAGE_VERSION "@GRAPHVIZ_VERSION_FULL@" + // Include headers #cmakedefine HAVE_UNISTD_H -- 2.40.0