From cbc87a7046d27f5f891972ed7becf55a43358826 Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Mon, 28 Apr 2014 11:40:26 +0100 Subject: [PATCH] CMakeLists.txt: add default versioning when git not present Signed-off-by: Brendan Le Foll --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 615a586..f3e0f46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}")