Private
Public Access
2
0

CMakeLists.txt: add default versioning when git not present

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-04-28 11:40:26 +01:00
parent f280b3c0f6
commit cbc87a7046

View File

@@ -10,6 +10,10 @@ set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_
# Make a version file containing the current version from git.
include (GetGitRevisionDescription)
git_describe (VERSION "--tags")
if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND")
message (WARNING " - Install git to compile a production libmaa!")
set (VERSION "v0.2.0-dirty")
endif ()
message (INFO " - MAA Version ${VERSION}")