Bläddra i källkod

Can build Mac Bundle

Thomas Buck 10 år sedan
förälder
incheckning
1459b7e25f
2 ändrade filer med 22 tillägg och 1 borttagningar
  1. 22
    1
      CMakeLists.txt
  2. Binär
      data/AppIcon.icns

+ 22
- 1
CMakeLists.txt Visa fil

@@ -9,6 +9,26 @@ set (OpenRaider_VERSION_MICRO 2)
9 9
 # Build Host
10 10
 set (OpenRaider_BUILD_HOST ${CMAKE_HOST_SYSTEM})
11 11
 
12
+# Apple specific
13
+if (APPLE)
14
+
15
+    # Mac Bundle Data
16
+    set (MACOSX_BUNDLE_INFO_STRING "Open Tomb Raider Engine")
17
+    set (MACOSX_BUNDLE_ICON_FILE "AppIcon")
18
+    set (MACOSX_BUNDLE_GUI_IDENTIFIER "de.xythobuz.OpenRaider")
19
+    set (MACOSX_BUNDLE_LONG_VERSION_STRING "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}")
20
+    set (MACOSX_BUNDLE_BUNDLE_NAME "OpenRaider")
21
+    set (MACOSX_BUNDLE_SHORT_VERSION_STRING "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}")
22
+    set (MACOSX_BUNDLE_BUNDLE_VERSION "${OpenRaider_VERSION_MAJOR}.${OpenRaider_VERSION_MINOR}.${OpenRaider_VERSION_MICRO}")
23
+    set (MACOSX_BUNDLE_COPYRIGHT "2001 - 2014")
24
+
25
+    # Copy Icon
26
+    set (MAC_ICON "${PROJECT_SOURCE_DIR}/data/AppIcon.icns")
27
+    set_source_files_properties(${MAC_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
28
+    set (SRCS ${SRCS} ${MAC_ICON})
29
+
30
+endif (APPLE)
31
+
12 32
 # Configuration Header file
13 33
 configure_file (
14 34
     "${PROJECT_SOURCE_DIR}/include/Config.h.in"
@@ -20,7 +40,7 @@ include_directories ("${PROJECT_BINARY_DIR}")
20 40
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
21 41
 
22 42
 # Source Files, Executable
23
-add_executable (OpenRaider
43
+add_executable (OpenRaider MACOSX_BUNDLE
24 44
     src/Camera.cpp
25 45
     src/Emitter.cpp
26 46
     src/GLString.cpp
@@ -42,6 +62,7 @@ add_executable (OpenRaider
42 62
     src/ViewVolume.cpp
43 63
     src/World.cpp
44 64
     src/tga.cpp
65
+    ${SRCS}
45 66
 )
46 67
 
47 68
 # Definitions for Debug build

Binär
data/AppIcon.icns Visa fil


Laddar…
Avbryt
Spara