diff options
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e7402dd..c48c6b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,11 +2,25 @@ cmake_minimum_required (VERSION 2.6) project (yawa) set(PACKAGE_NAME "yawa") -set(PACKAGE_VERSION "0.0.1") + +if(EXISTS ".git/") + find_package(Git) + if(GIT_FOUND) + execute_process( + COMMAND ${GIT_EXECUTABLE} describe + OUTPUT_VARIABLE GIT_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(PACKAGE_VERSION ${GIT_VERSION}) + endif() +else() + set(PACKAGE_VERSION "0.0.1") +endif() + set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_DESCRIPTION "Yet Another Wallpaper Application") set(PACKAGE_BUGREPORT "johannes@kyriasis.com") + set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") configure_file( |