Permalink
Browse files

add in version helper info

  • Loading branch information...
1 parent cd15f1f commit b01664497e371a16f88776aa52e3c0672f2037d6 @ernfrid ernfrid committed Dec 5, 2014
Showing with 21 additions and 0 deletions.
  1. +9 −0 CMakeLists.txt
  2. +12 −0 version/version.h.in
View
@@ -8,6 +8,11 @@ include(TestHelper)
include(VersionHelper)
include(ProjectHelper)
+set(EXE_VERSION_SUFFIX ${FULL_VERSION})
+
+configure_file(version/version.h.in version/version.h @ONLY)
+include_directories(${PROJECT_BINARY_DIR}/version)
+
set(REQUIRED_BOOST_LIBS program_options regex)
include(BuildBoost)
include_directories(${Boost_INCLUDE_DIRS})
@@ -61,3 +66,7 @@ enable_testing(true)
# integration testing
add_subdirectory(integration-test)
+
+###########################################################################
+## Packaging
+include(PackageInfo.cmake)
View
@@ -0,0 +1,12 @@
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const static char* __g_prog_version = "@FULL_VERSION@";
+const static char* __g_commit_hash = "@COMMIT_HASH@";
+
+#ifdef __cplusplus
+}
+#endif

0 comments on commit b016644

Please sign in to comment.