]> git.jsancho.org Git - lugaru.git/commitdiff
Made massive change to CMake scripts. Hopefully now CMake scripts will produce workin...
authorNeal Gompa <ngompa13@gmail.com>
Sun, 16 May 2010 02:15:57 +0000 (21:15 -0500)
committerNeal Gompa <ngompa13@gmail.com>
Sun, 16 May 2010 02:15:57 +0000 (21:15 -0500)
21 files changed:
CMakeLists.txt
Source/mac-res/Info.plist [new file with mode: 0644]
Source/mac-res/lugaru.icns [new file with mode: 0644]
Source/res/Lugaru.aps [deleted file]
Source/res/Lugaru.png [deleted file]
Source/res/Lugaru.psd [deleted file]
Source/res/Lugaru.rc [deleted file]
Source/res/Untitled-1.jpg [deleted file]
Source/res/icon1.ico [deleted file]
Source/res/icon2.ico [deleted file]
Source/res/lugaru.ico [deleted file]
Source/res/resource.h [deleted file]
Source/win-res/Lugaru.aps [new file with mode: 0644]
Source/win-res/Lugaru.png [new file with mode: 0644]
Source/win-res/Lugaru.psd [new file with mode: 0644]
Source/win-res/Lugaru.rc [new file with mode: 0644]
Source/win-res/Untitled-1.jpg [new file with mode: 0644]
Source/win-res/icon1.ico [new file with mode: 0644]
Source/win-res/icon2.ico [new file with mode: 0644]
Source/win-res/lugaru.ico [new file with mode: 0644]
Source/win-res/resource.h [new file with mode: 0644]

index cdc4e15104769b2dc0a037c92032d1bd4e41e1cd..aafeabb9715de8f7781571c0b810db47b147ef67 100644 (file)
@@ -30,6 +30,14 @@ if(MINGW)
        set(OPENGL_glu_LIBRARY "-lglu32" CACHE STRING "GLU library for Win32" FORCE)
 endif(MINGW)
 
+if(APPLE)
+       set(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
+       set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING 
+               "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value" FORCE)
+       set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk" CACHE PATH 
+               "The product will be built against the headers and libraries located inside the indicated SDK." FORCE)
+endif(APPLE)
+
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
 
 set(LUGARU_SRCS
@@ -117,29 +125,29 @@ if(WIN32)
   if(CMAKE_CROSSCOMPILING)
     ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
                                                  COMMAND i686-pc-mingw32-windres
-                                                         -I${SRCDIR}/res
+                                                         -I${SRCDIR}/win-res
                                                          -o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
-                                                         -i${SRCDIR}/res/Lugaru.rc
-                                             DEPENDS ${SRCDIR}/res/Lugaru.rc
+                                                         -i${SRCDIR}/win-res/Lugaru.rc
+                                             DEPENDS ${SRCDIR}/win-res/Lugaru.rc
                                                  )
   endif(CMAKE_CROSSCOMPILING)
   if(NOT CMAKE_CROSSCOMPILING)
    if(MSVC)
     ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
                                                  COMMAND rc
-                                                         -I${SRCDIR}/res
+                                                         -I${SRCDIR}/win-res
                                                          -fo${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
-                                                         ${SRCDIR}/res/Lugaru.rc
-                                             DEPENDS ${SRCDIR}/res/Lugaru.rc
+                                                         ${SRCDIR}/win-res/Lugaru.rc
+                                             DEPENDS ${SRCDIR}/win-res/Lugaru.rc
                                                  )
    endif(MSVC)
    if(MINGW)
     ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
                                                  COMMAND windres
-                                                         -I${SRCDIR}/res
+                                                         -I${SRCDIR}/win-res
                                                          -o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
-                                                         -i${SRCDIR}/res/Lugaru.rc
-                                             DEPENDS ${SRCDIR}/res/Lugaru.rc
+                                                         -i${SRCDIR}/win-res/Lugaru.rc
+                                             DEPENDS ${SRCDIR}/win-res/Lugaru.rc
                                                  )
    endif(MINGW)
   endif(NOT CMAKE_CROSSCOMPILING)
@@ -152,7 +160,7 @@ if(WIN32)
   set(LUGARU_H
        ${LUGARU_H}
        ${SRCDIR}/WinDefs.h
-       ${SRCDIR}/res/resource.h)
+       ${SRCDIR}/win-res/resource.h)
 endif(WIN32)
 
 if (APPLE)
@@ -457,6 +465,16 @@ if (NOT OGGVORBIS_FOUND)
     )
 endif (NOT OGGVORBIS_FOUND)
 
+if(APPLE)
+       # Save our sanity; Set all available libraries to internal by default
+       set(LUGARU_FORCE_INTERNAL_SDL True)
+       set(LUGARU_FORCE_INTERNAL_GLU True)
+       set(LUGARU_FORCE_INTERNAL_JPEG True)
+       set(LUGARU_FORCE_INTERNAL_PNG True)
+       set(LUGARU_FORCE_INTERNAL_VORBIS True)
+       set(LUGARU_FORCE_INTERNAL_ZLIB True)
+endif(APPLE)
+
 include_directories(
     ${OPENAL_INCLUDE_DIR}
     ${JPEG_INCLUDE_DIR}
@@ -488,6 +506,12 @@ else(WIN32)
 endif(WIN32)
 
 # Install target
+if(APPLE)
+       set(APPS_ROOT "${CMAKE_INSTALL_PREFIX}/Lugaru.app")
+       set(APPS_BIN "${APPS_ROOT}/Contents/MacOS")
+       set(APPS_DATA "${APPS_ROOT}/Contents/Resources")
+endif(APPLE)
+
 if(WIN32)
        install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru.exe DESTINATION ${CMAKE_INSTALL_PREFIX})
        if(MSVC80)
@@ -503,6 +527,11 @@ if(WIN32)
                install(FILES ${OPENALDIR}/lib/win32/mingw/OpenAL32.dll DESTINATION ${CMAKE_INSTALL_PREFIX})
        endif(MINGW)
 else(WIN32)
+       if(APPLE)
+               set(CMAKE_INSTALL_PREFIX "${APPS_BIN}")
+               install(FILES ${SRCDIR}/mac-res/lugaru.icns DESTINATION ${APPS_DATA})
+               install(FILES ${SRCDIR}/mac-res/Info.plist DESTINATION ${APPS_ROOT}/Contents)
+       endif(APPLE)
        install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/lugaru DESTINATION ${CMAKE_INSTALL_PREFIX})
        if(APPLE AND LUGARU_HAS_INTERNAL_SDL)
                install(FILES ${SDLDIR}/lib/macosx/libSDL-1.2.0.dylib DESTINATION ${CMAKE_INSTALL_PREFIX})
diff --git a/Source/mac-res/Info.plist b/Source/mac-res/Info.plist
new file mode 100644 (file)
index 0000000..dccd26b
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>lugaru</string>
+       <key>CFBundleIconFile</key>
+       <string>lugaru.icns</string>
+       <key>CFBundleIdentifier</key>
+       <string>com.wolfire.Lugaru</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>Lugaru: The Rabbit's Foot</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleShortVersionString</key>
+       <string>1.1</string>
+       <key>LSMinimumSystemVersion</key>
+       <string>10.5.0</string>
+       <key>CFBundleVersion</key>
+       <string>1</string>
+       <key>NSMainNibFile</key>
+       <string>MainMenu</string>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/Source/mac-res/lugaru.icns b/Source/mac-res/lugaru.icns
new file mode 100644 (file)
index 0000000..b3c918a
Binary files /dev/null and b/Source/mac-res/lugaru.icns differ
diff --git a/Source/res/Lugaru.aps b/Source/res/Lugaru.aps
deleted file mode 100644 (file)
index 91455a8..0000000
Binary files a/Source/res/Lugaru.aps and /dev/null differ
diff --git a/Source/res/Lugaru.png b/Source/res/Lugaru.png
deleted file mode 100644 (file)
index 1db3a89..0000000
Binary files a/Source/res/Lugaru.png and /dev/null differ
diff --git a/Source/res/Lugaru.psd b/Source/res/Lugaru.psd
deleted file mode 100644 (file)
index e3802af..0000000
Binary files a/Source/res/Lugaru.psd and /dev/null differ
diff --git a/Source/res/Lugaru.rc b/Source/res/Lugaru.rc
deleted file mode 100644 (file)
index dd30038..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE 
-BEGIN
-    "#include ""afxres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_LUGARU              ICON                    "lugaru.ico"
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
diff --git a/Source/res/Untitled-1.jpg b/Source/res/Untitled-1.jpg
deleted file mode 100644 (file)
index 8622136..0000000
Binary files a/Source/res/Untitled-1.jpg and /dev/null differ
diff --git a/Source/res/icon1.ico b/Source/res/icon1.ico
deleted file mode 100644 (file)
index 9d0e916..0000000
Binary files a/Source/res/icon1.ico and /dev/null differ
diff --git a/Source/res/icon2.ico b/Source/res/icon2.ico
deleted file mode 100644 (file)
index 659202e..0000000
Binary files a/Source/res/icon2.ico and /dev/null differ
diff --git a/Source/res/lugaru.ico b/Source/res/lugaru.ico
deleted file mode 100644 (file)
index 5a2895e..0000000
Binary files a/Source/res/lugaru.ico and /dev/null differ
diff --git a/Source/res/resource.h b/Source/res/resource.h
deleted file mode 100644 (file)
index b07c562..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by Lugaru.rc
-//
-#define IDI_LUGARU                      104
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        105
-#define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1001
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
diff --git a/Source/win-res/Lugaru.aps b/Source/win-res/Lugaru.aps
new file mode 100644 (file)
index 0000000..91455a8
Binary files /dev/null and b/Source/win-res/Lugaru.aps differ
diff --git a/Source/win-res/Lugaru.png b/Source/win-res/Lugaru.png
new file mode 100644 (file)
index 0000000..1db3a89
Binary files /dev/null and b/Source/win-res/Lugaru.png differ
diff --git a/Source/win-res/Lugaru.psd b/Source/win-res/Lugaru.psd
new file mode 100644 (file)
index 0000000..e3802af
Binary files /dev/null and b/Source/win-res/Lugaru.psd differ
diff --git a/Source/win-res/Lugaru.rc b/Source/win-res/Lugaru.rc
new file mode 100644 (file)
index 0000000..dd30038
--- /dev/null
@@ -0,0 +1,72 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_LUGARU              ICON                    "lugaru.ico"
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/Source/win-res/Untitled-1.jpg b/Source/win-res/Untitled-1.jpg
new file mode 100644 (file)
index 0000000..8622136
Binary files /dev/null and b/Source/win-res/Untitled-1.jpg differ
diff --git a/Source/win-res/icon1.ico b/Source/win-res/icon1.ico
new file mode 100644 (file)
index 0000000..9d0e916
Binary files /dev/null and b/Source/win-res/icon1.ico differ
diff --git a/Source/win-res/icon2.ico b/Source/win-res/icon2.ico
new file mode 100644 (file)
index 0000000..659202e
Binary files /dev/null and b/Source/win-res/icon2.ico differ
diff --git a/Source/win-res/lugaru.ico b/Source/win-res/lugaru.ico
new file mode 100644 (file)
index 0000000..5a2895e
Binary files /dev/null and b/Source/win-res/lugaru.ico differ
diff --git a/Source/win-res/resource.h b/Source/win-res/resource.h
new file mode 100644 (file)
index 0000000..b07c562
--- /dev/null
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Lugaru.rc
+//
+#define IDI_LUGARU                      104
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        105
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif