Browse Source

Mac OS X fixes - Polycore, Polycode2DPhysics and Polycode3DPhysics compile and link.

Cameron Hart 14 năm trước cách đây
mục cha
commit
aa4c0f05b9

+ 5 - 3
Core/Contents/CMakeLists.txt

@@ -196,8 +196,9 @@ IF(MSVC)
     SET(polycore_SRCS ${polycore_SRCS} ../Build/MSVC/Polycore/PolycodeView.cpp Source/PolyWinCore.cpp)
     SET(polycore_HDRS ${polycore_HDRS} ../Build/MSVC/Polycore/PolycodeView.h Include/PolyWinCore.h)
 ELSEIF(APPLE)
-    SET(polycore_SRCS ${polycore_SRCS} "../Build/Mac OS X/PolycodeView.mm" Source/PolyAGLCore.cpp Source/PolyCocoaCore.cpp)
-    SET(polycore_HDRS ${polycore_HDRS} "../Build/Mac OS X/PolycodeView.h" Include/PolyAGLCore.h Include/PolyCocoaCore.h)
+    SET(polycore_SRCS ${polycore_SRCS} "../Build/Mac OS X/PolycodeView.mm" Source/PolyCocoaCore.mm)
+    SET(polycore_HDRS ${polycore_HDRS} "../Build/Mac OS X/PolycodeView.h" Include/PolyCocoaCore.h)
+    SET(EXTRA_LIBS "-framework Cocoa")
 ELSE(MSVC)
     SET(polycore_SRCS ${polycore_SRCS} ../Build/Linux/PolycodeView.cpp Source/PolySDLCore.cpp)
     SET(polycore_HDRS ${polycore_HDRS} ../Build/Linux/PolycodeView.h Include/PolySDLCore.h)
@@ -214,7 +215,8 @@ IF(POLYCODE_BUILD_SHARED)
         ${OGG_LIBRARIES}
         ${VORBIS_LIBRARIES}
         ${VORBISFILE_LIBRARIES}
-        ${SDL_LIBRARY})
+        ${SDL_LIBRARY}
+        ${EXTRA_LIBS})
 ENDIF(POLYCODE_BUILD_SHARED)
 
 IF(POLYCODE_BUILD_STATIC)

+ 0 - 0
Core/Contents/Source/PolyCocoaCore.cpp → Core/Contents/Source/PolyCocoaCore.mm


+ 2 - 2
Tools/Contents/polybuild/Source/polybuild.cpp

@@ -147,7 +147,7 @@ int main(int argc, char **argv) {
 		installPath = installPath + cpts[i];
 		installPath += String("/");
 	}
-#elseif defined (_WINDOWS)
+#elif defined (_WINDOWS)
 	char path[2049];
 	TCHAR tpath[2049];
 	GetModuleFileName(NULL, (LPWSTR)tpath, 2048);
@@ -198,7 +198,7 @@ int main(int argc, char **argv) {
 	char dirPath[4099];
 #if defined(__APPLE__) && defined(__MACH__)
 	_getcwd(dirPath, sizeof(dirPath));
-#elseif defined (_WINDOWS)
+#elif defined (_WINDOWS)
 	TCHAR tdirpath[4099];
 	GetCurrentDirectory(4098, (LPWSTR)tdirpath);
 	wtoc(dirPath, tdirpath, 4098);