Parcourir la source

Simplified Config.h template

Thomas Buck il y a 11 ans
Parent
révision
d6f06ef7db
3 fichiers modifiés avec 6 ajouts et 16 suppressions
  1. 1
    0
      CMakeLists.txt
  2. 2
    13
      cmake/Config.h.in
  3. 3
    3
      src/CMakeLists.txt

+ 1
- 0
CMakeLists.txt Voir le fichier

@@ -5,6 +5,7 @@ project (OpenRaider)
5 5
 set (OpenRaider_VERSION_MAJOR 0)
6 6
 set (OpenRaider_VERSION_MINOR 1)
7 7
 set (OpenRaider_VERSION_MICRO 2)
8
+set (OpenRaider_VERSION_RELEASE -git)
8 9
 
9 10
 # Build Host
10 11
 set (OpenRaider_BUILD_HOST ${CMAKE_HOST_SYSTEM})

+ 2
- 13
cmake/Config.h.in Voir le fichier

@@ -1,13 +1,2 @@
1
-#define OpenRaider_VERSION_MAJOR @OpenRaider_VERSION_MAJOR@
2
-#define OpenRaider_VERSION_MINOR @OpenRaider_VERSION_MINOR@
3
-#define OpenRaider_VERSION_MICRO @OpenRaider_VERSION_MICRO@
4
-#define OpenRaider_BUILD_HOST @OpenRaider_BUILD_HOST@
5
-
6
-// Stringification Helper
7
-#define _xstringify(s) _stringify(s)
8
-#define _stringify(s) #s
9
-
10
-#define VERSION_NUMBER OpenRaider_VERSION_MAJOR.OpenRaider_VERSION_MINOR.OpenRaider_VERSION_MICRO
11
-
12
-#define VERSION _xstringify(OpenRaider-VERSION_NUMBER)
13
-#define BUILD_HOST _xstringify(OpenRaider_BUILD_HOST)
1
+#define VERSION "OpenRaider-@OpenRaider_VERSION_MAJOR@.@OpenRaider_VERSION_MINOR@.@OpenRaider_VERSION_MICRO@@OpenRaider_VERSION_RELEASE@"
2
+#define BUILD_HOST "@OpenRaider_BUILD_HOST@"

+ 3
- 3
src/CMakeLists.txt Voir le fichier

@@ -27,10 +27,10 @@ if (APPLE)
27 27
     set (MACOSX_BUNDLE_INFO_STRING "OpenSource TombRaider Game Engine")
28 28
     set (MACOSX_BUNDLE_ICON_FILE "AppIcon")
29 29
     set (MACOSX_BUNDLE_GUI_IDENTIFIER "de.xythobuz.OpenRaider")
30
-    set (MACOSX_BUNDLE_LONG_VERSION_STRING "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}")
30
+    set (MACOSX_BUNDLE_LONG_VERSION_STRING "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}-${OpenRaider_VERSION_RELEASE}")
31 31
     set (MACOSX_BUNDLE_BUNDLE_NAME "OpenRaider")
32
-    set (MACOSX_BUNDLE_SHORT_VERSION_STRING "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}")
33
-    set (MACOSX_BUNDLE_BUNDLE_VERSION "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}")
32
+    set (MACOSX_BUNDLE_SHORT_VERSION_STRING "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}-${OpenRaider_VERSION_RELEASE}")
33
+    set (MACOSX_BUNDLE_BUNDLE_VERSION "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}-${OpenRaider_VERSION_RELEASE}")
34 34
     set (MACOSX_BUNDLE_COPYRIGHT "2001 - 2014")
35 35
 
36 36
     # Copy Icon

Chargement…
Annuler
Enregistrer