]> granicus.if.org Git - graphviz/commitdiff
Add Graphviz version define to config-cmake.h.in
authorErwin Janssen <erwinjanssen@outlook.com>
Wed, 4 Jan 2017 22:57:32 +0000 (23:57 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Thu, 19 Jan 2017 11:53:50 +0000 (12:53 +0100)
This adds the `PACKAGE_VERSION` define, which is used in various parts to
print the version number.

CMakeLists.txt
config-cmake.h.in

index ea9a32c4f3c8976c02e385a2c55634c282b38cc7..1458f397f350e112554706f8638c7139b533e6ff 100644 (file)
@@ -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})
 
index 6d2dc3d89919c7b1cfa9fad1f0d60dc5437d925a..dce248e0d0d7d5b2cb752a7a99fcd65e33535a35 100644 (file)
@@ -1,3 +1,6 @@
+// Values
+#define PACKAGE_VERSION "@GRAPHVIZ_VERSION_FULL@"
+
 // Include headers
 #cmakedefine HAVE_UNISTD_H