summaryrefslogtreecommitdiff
path: root/cmake/scripts
diff options
context:
space:
mode:
authorLoïc Guilloux <glx22@users.noreply.github.com>2021-04-20 21:38:46 +0200
committerGitHub <noreply@github.com>2021-04-20 21:38:46 +0200
commitd4f0b6f434911840e2762f89ca0de460f38133f9 (patch)
tree2cedadbe1e0a9ad7d8f9b1d0004dac4feb1f16a0 /cmake/scripts
parentfe3cd185d7a00d116e0ff06d24b3ac369b297a0e (diff)
downloadopenttd-d4f0b6f434911840e2762f89ca0de460f38133f9.tar.xz
Fix: [CMake] Auto-fill version details in rev.cpp and ottres.rc (#9066)
Diffstat (limited to 'cmake/scripts')
-rw-r--r--cmake/scripts/FindVersion.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/scripts/FindVersion.cmake b/cmake/scripts/FindVersion.cmake
index ebbe58244..6e4a2b390 100644
--- a/cmake/scripts/FindVersion.cmake
+++ b/cmake/scripts/FindVersion.cmake
@@ -1,5 +1,15 @@
cmake_minimum_required(VERSION 3.5)
+if(NOT REV_MAJOR)
+ set(REV_MAJOR 0)
+endif()
+if(NOT REV_MINOR)
+ set(REV_MINOR 0)
+endif()
+if(NOT REV_BUILD)
+ set(REV_BUILD 0)
+endif()
+
#
# Finds the current version of the current folder.
#