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:
@@ -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.
|
# Make a version file containing the current version from git.
|
||||||
include (GetGitRevisionDescription)
|
include (GetGitRevisionDescription)
|
||||||
git_describe (VERSION "--tags")
|
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}")
|
message (INFO " - MAA Version ${VERSION}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user