diff CMakeLists.txt @ 495:7a8f5b85fd9a

Dynamically generate version information from HG
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 25 Apr 2014 10:14:33 +0000
parents 09bb19e5e369
children 4f972b1f4996
line wrap: on
line diff
--- a/CMakeLists.txt	Fri Apr 25 09:03:16 2014 +0000
+++ b/CMakeLists.txt	Fri Apr 25 10:14:33 2014 +0000
@@ -21,6 +21,15 @@
 
 include(CTest)
 include(GenerateCppcheck)
+include(HGVersion)
+
+if(HG_REVISION)
+   set(PROJECT_VERSION ${HG_REVISION})
+else()
+   set(PROJECT_VERSION unknown)
+endif()
+
+add_definitions(-DVERSION="${PROJECT_VERSION}")
 
 find_package(PolarSSL)
 include_directories(${POLARSSL_INCLUDE_DIR})
@@ -102,3 +111,6 @@
 # Documentation
 configure_file (doc/Doxyfile.in doc/Doxyfile)
 add_subdirectory(doc)
+
+# Configure packaging script for testing
+configure_file (packaging/tmp-createpackage.sh.in packaging/tmp-createpackage.sh)

http://wald.intevation.org/projects/trustbridge/