Browse Source

Simplified the Xcode project to a single Framework target

Static and shared libraries can be built using CMake support in SDL 3.0

Built tests for macOS, iOS, and tvOS
Sam Lantinga 2 years ago
parent
commit
c94cb3a5d8

File diff suppressed because it is too large
+ 21 - 2601
Xcode/SDL/SDL.xcodeproj/project.pbxproj


File diff suppressed because it is too large
+ 647 - 169
Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj


+ 3 - 3
Xcode/SDLTest/config.xcconfig

@@ -7,8 +7,8 @@
 // https://help.apple.com/xcode/#/dev745c5c974
 
 // Include any optional config for this build
+// This allows you to set DEVELOPMENT_TEAM for all targets, for example.
 #include? "build.xcconfig"
 
-CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL3 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
-CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework SDL3 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
-CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework SDL3 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
+CONFIG_FRAMEWORK_LDFLAGS = -lSDL3_test
+

+ 4 - 0
src/hidapi/ios/hid.m

@@ -20,6 +20,8 @@
 */
 #include "SDL_internal.h"
 
+#if defined(__IOS__) || defined(__TVOS__)
+
 #ifndef SDL_HIDAPI_DISABLED
 
 #include "../SDL_hidapi_c.h"
@@ -1031,3 +1033,5 @@ HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *dev)
 }
 
 #endif /* !SDL_HIDAPI_DISABLED */
+
+#endif /* __IOS__ || __TVOS__ */

+ 4 - 0
src/misc/ios/SDL_sysurl.m

@@ -20,6 +20,8 @@
 */
 #include "SDL_internal.h"
 
+#if defined(__IOS__) || defined(__TVOS__)
+
 #include "../SDL_sysurl.h"
 
 #import <UIKit/UIKit.h>
@@ -33,3 +35,5 @@ int SDL_SYS_OpenURL(const char *url)
         return [[UIApplication sharedApplication] openURL:nsurl] ? 0 : -1;
     }
 }
+
+#endif /* __IOS__ || __TVOS__ */

+ 4 - 0
src/misc/macos/SDL_sysurl.m

@@ -20,6 +20,8 @@
 */
 #include "SDL_internal.h"
 
+#if defined(__MACOS__)
+
 #include "../SDL_sysurl.h"
 
 #import <Cocoa/Cocoa.h>
@@ -33,3 +35,5 @@ int SDL_SYS_OpenURL(const char *url)
         return status == noErr ? 0 : -1;
     }
 }
+
+#endif /* __MACOS__ */

Some files were not shown because too many files changed in this diff