summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/CMakeLists.txt4
-rw-r--r--lib/doc/CMakeLists.txt12
-rw-r--r--lib/doc/Doxyfile.in2
3 files changed, 13 insertions, 5 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 44d8526c6..796de8df8 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -32,10 +32,6 @@ endif()
include (Packaging)
-set(CMAKE_VERSION_MAJOR 0)
-set(CMAKE_VERSION_MINOR 1)
-set(CMAKE_VERSION_PATCH 1)
-
option(CMAKE_BUILD_TEST "Build unit tests" OFF)
if (NOT CMAKE_BUILD_TYPE)
diff --git a/lib/doc/CMakeLists.txt b/lib/doc/CMakeLists.txt
index 9b4660337..135addc09 100644
--- a/lib/doc/CMakeLists.txt
+++ b/lib/doc/CMakeLists.txt
@@ -11,6 +11,18 @@ if(BUILD_DOCUMENTATION)
set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+ # extract version from git
+ execute_process(
+ COMMAND git describe --long --match v*
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ OUTPUT_VARIABLE VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+ if (NOT VERSION)
+ set(VERSION "v1.0-1-gcafe")
+ endif()
+
configure_file(${doxyfile_in} ${doxyfile} @ONLY)
add_custom_target(doc
diff --git a/lib/doc/Doxyfile.in b/lib/doc/Doxyfile.in
index ce352c734..a28fb3a1a 100644
--- a/lib/doc/Doxyfile.in
+++ b/lib/doc/Doxyfile.in
@@ -1,5 +1,5 @@
PROJECT_NAME = "Hybrid ICN (hICN)"
-PROJECT_NUMBER = v@CMAKE_VERSION_MAJOR@.@CMAKE_VERSION_MINOR@.@CMAKE_VERSION_PATCH@
+PROJECT_NUMBER = @VERSION@
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ \
@PROJECT_BINARY_DIR@
INPUT = @doxy_main_page@ \