summaryrefslogtreecommitdiffstats
path: root/application/CMakeLists.txt
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-02-09 21:00:45 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-12 20:57:18 +0200
commitd1ba972c596e38085c49208eee759302a57d1662 (patch)
tree9a00ef5003c5077a4641e92f2d4bdb11845d79e7 /application/CMakeLists.txt
parentdb877ba121ff87a4e029daf8555d85dfef45993a (diff)
downloadMultiMC-d1ba972c596e38085c49208eee759302a57d1662.tar
MultiMC-d1ba972c596e38085c49208eee759302a57d1662.tar.gz
MultiMC-d1ba972c596e38085c49208eee759302a57d1662.tar.lz
MultiMC-d1ba972c596e38085c49208eee759302a57d1662.tar.xz
MultiMC-d1ba972c596e38085c49208eee759302a57d1662.zip
SCRATCH move some cmake bits
Diffstat (limited to 'application/CMakeLists.txt')
-rw-r--r--application/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt
index 58a90efa..9e94cdad 100644
--- a/application/CMakeLists.txt
+++ b/application/CMakeLists.txt
@@ -29,6 +29,11 @@ set(MultiMC_UPDATER false CACHE BOOL "Whether or not the update system is enable
# Notification URL
set(MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications.")
+#### Check the current Git commit
+include(GitFunctions)
+git_run(COMMAND rev-parse HEAD DEFAULT "Unknown" OUTPUT_VAR MultiMC_GIT_COMMIT)
+message(STATUS "Git commit: ${MultiMC_GIT_COMMIT}")
+
set(MultiMC_RELEASE_VERSION_NAME "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}")
if(MultiMC_VERSION_HOTFIX GREATER 0)
set(MultiMC_RELEASE_VERSION_NAME "${MultiMC_RELEASE_VERSION_NAME}.${MultiMC_VERSION_HOTFIX}")
@@ -50,6 +55,9 @@ endif()
message(STATUS "MultiMC 5 Version: ${MultiMC_VERSION_STRING}")
+#### Custom target to just print the version.
+add_custom_target(version echo "Version: ${MultiMC_VERSION_STRING}")
+
# If the update system is enabled, make sure MultiMC_CHANLIST_URL and MultiMC_VERSION_CHANNEL are set.
if(MultiMC_UPDATER)
if(MultiMC_VERSION_CHANNEL STREQUAL "")