Skip to content

Commit 82ee70f

Browse files
committed
Fix SDL2 references, remove hardcoded paths, update XCode project
1 parent a6a4fa6 commit 82ee70f

13 files changed

Lines changed: 47 additions & 20 deletions

File tree

GP2X/gp2x.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef GP2X_H
22
#define GP2X_H
33

4-
#include <SDL/SDL.h>
4+
#include <SDL2/SDL.h>
55
#include <sys/ioctl.h>
66
#include <sys/soundcard.h>
77
#include <fcntl.h>
@@ -10,7 +10,7 @@
1010
#include "../wl_def.h"
1111
#if defined(GP2X_940)
1212
#include "fmopl.h"
13-
#include <SDL_gp2x.h>
13+
#include <SDL2/SDL_gp2x.h>
1414
#endif
1515

1616
#define GP2X_BUTTON_UP (0)

dc/dc_maple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#if defined(_arch_dreamcast)
66

7-
#include <SDL.h>
7+
#include <SDL2/SDL.h>
88
#include "dc/maple.h"
99
#include "dc/maple/controller.h"
1010
#include "dc/maple/vmu.h"

dosbox/dbopl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#elif !defined(_WIN32)
2222
# include <stdint.h>
2323
#endif
24-
#include <SDL.h>
24+
#include <SDL2/SDL.h>
2525

2626
//typedef uintptr_t Bitu;
2727
//typedef intptr_t Bits;

gp2x.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef GP2X_H
22
#define GP2X_H
33

4-
#include <SDL/SDL.h>
4+
#include <SDL2/SDL.h>
55
#include <sys/ioctl.h>
66
#include <sys/soundcard.h>
77
#include <fcntl.h>

id_sd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
//
2929

3030
#include "wl_def.h"
31-
#include <SDL_mixer.h>
31+
#include <SDL2/SDL_mixer.h>
3232
#if defined(GP2X_940)
3333
#include "gp2x/fmopl.h"
3434
#else

macosx/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<key>CFBundleIconFile</key>
1212
<string>wolf4sdl.icns</string>
1313
<key>CFBundleIdentifier</key>
14-
<string>com.chrisballinger.wolf4sdl</string>
14+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1515
<key>CFBundleInfoDictionaryVersion</key>
1616
<string>6.0</string>
1717
<key>CFBundleName</key>

macosx/SDLMain.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Feel free to customize this file to suit your needs
66
*/
77

8-
#include "SDL.h"
9-
#include "SDLMain.h"
8+
#include "SDL2/SDL.h"
9+
#include "SDL2/SDLMain.h"
1010
#include <sys/param.h> /* for MAXPATHLEN */
1111
#include <unistd.h>
1212

macosx/Wolf4SDL.xcodeproj/project.pbxproj

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@
320320
29B97313FDCFA39411CA2CEA /* Project object */ = {
321321
isa = PBXProject;
322322
attributes = {
323-
LastUpgradeCheck = 0640;
323+
LastUpgradeCheck = 0920;
324324
};
325325
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Wolf4SDL" */;
326326
compatibilityVersion = "Xcode 3.2";
@@ -365,7 +365,7 @@
365365
);
366366
runOnlyForDeploymentPostprocessing = 0;
367367
shellPath = /bin/sh;
368-
shellScript = "mkdir -p ../build/dep/lib\nmkdir -p ../build/dep/include\nmkdir -p ../build/tmp\nif [ ! -f ../build/dep/lib/libSDL2.a ]; then\n /usr/bin/curl -L -o ../build/tmp/tmp.tar.gz https://dl.dropboxusercontent.com/u/5103936/build-prereqs/wolf4sdl-osx/sdl2.tar.gz\n pushd ../build/tmp\n tar -zxf tmp.tar.gz\n popd\n mv ../build/tmp/*.a ../build/dep/lib\n mv ../build/tmp/*.h ../build/dep/include\n rm ../build/tmp/*\nfi";
368+
shellScript = "rm -rf build\nmkdir -p build/dep/lib\n mkdir -p build/dep/include\n ln -s /usr/local/include/SDL2 build/dep/include\n ln -s /usr/local/lib/SDL2 build/dep/lib";
369369
};
370370
/* End PBXShellScriptBuildPhase section */
371371

@@ -433,8 +433,8 @@
433433
LIBRARY_SEARCH_PATHS = (
434434
"$(inherited)",
435435
../build/dep/lib,
436-
/Users/ioan/dezvoltare/cross/wolf4sdl/build/dep/lib,
437436
);
437+
PRODUCT_BUNDLE_IDENTIFIER = com.chrisballinger.wolf4sdl;
438438
PRODUCT_NAME = Wolf4SDL;
439439
WRAPPER_EXTENSION = app;
440440
ZERO_LINK = YES;
@@ -454,10 +454,10 @@
454454
LIBRARY_SEARCH_PATHS = (
455455
"$(inherited)",
456456
../build/dep/lib,
457-
/Users/ioan/dezvoltare/cross/wolf4sdl/build/dep/lib,
458457
);
459458
OTHER_CFLAGS = "-fast";
460459
OTHER_CPLUSPLUSFLAGS = "-fast";
460+
PRODUCT_BUNDLE_IDENTIFIER = com.chrisballinger.wolf4sdl;
461461
PRODUCT_NAME = Wolf4SDL;
462462
WRAPPER_EXTENSION = app;
463463
};
@@ -466,14 +466,24 @@
466466
C01FCF4F08A954540054247B /* Debug */ = {
467467
isa = XCBuildConfiguration;
468468
buildSettings = {
469+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
470+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
469471
CLANG_WARN_BOOL_CONVERSION = YES;
472+
CLANG_WARN_COMMA = YES;
470473
CLANG_WARN_CONSTANT_CONVERSION = YES;
471474
CLANG_WARN_EMPTY_BODY = YES;
472475
CLANG_WARN_ENUM_CONVERSION = YES;
476+
CLANG_WARN_INFINITE_RECURSION = YES;
473477
CLANG_WARN_INT_CONVERSION = YES;
478+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
479+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
480+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
481+
CLANG_WARN_STRICT_PROTOTYPES = YES;
482+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
474483
CLANG_WARN_UNREACHABLE_CODE = YES;
475484
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
476485
ENABLE_STRICT_OBJC_MSGSEND = YES;
486+
ENABLE_TESTABILITY = YES;
477487
GCC_NO_COMMON_BLOCKS = YES;
478488
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
479489
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -487,7 +497,7 @@
487497
../build/dep/include,
488498
);
489499
LIBRARY_SEARCH_PATHS = ../build/dep/lib;
490-
MACOSX_DEPLOYMENT_TARGET = 10.6;
500+
MACOSX_DEPLOYMENT_TARGET = 10.13;
491501
ONLY_ACTIVE_ARCH = YES;
492502
PREBINDING = NO;
493503
};
@@ -496,11 +506,20 @@
496506
C01FCF5008A954540054247B /* Release */ = {
497507
isa = XCBuildConfiguration;
498508
buildSettings = {
509+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
510+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
499511
CLANG_WARN_BOOL_CONVERSION = YES;
512+
CLANG_WARN_COMMA = YES;
500513
CLANG_WARN_CONSTANT_CONVERSION = YES;
501514
CLANG_WARN_EMPTY_BODY = YES;
502515
CLANG_WARN_ENUM_CONVERSION = YES;
516+
CLANG_WARN_INFINITE_RECURSION = YES;
503517
CLANG_WARN_INT_CONVERSION = YES;
518+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
519+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
520+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
521+
CLANG_WARN_STRICT_PROTOTYPES = YES;
522+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
504523
CLANG_WARN_UNREACHABLE_CODE = YES;
505524
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
506525
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -521,8 +540,9 @@
521540
../build/dep/include,
522541
);
523542
LIBRARY_SEARCH_PATHS = ../build/dep/lib;
543+
"LIBRARY_SEARCH_PATHS[arch=*]" = /usr/local/include/;
524544
LLVM_LTO = YES;
525-
MACOSX_DEPLOYMENT_TARGET = 10.6;
545+
MACOSX_DEPLOYMENT_TARGET = 10.13;
526546
PREBINDING = NO;
527547
};
528548
name = Release;

macosx/Wolf4SDL.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdl_winmain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#endif
3030

3131
/* Include the SDL main definition header */
32-
#include "SDL.h"
33-
#include "SDL_main.h"
32+
#include "SDL2/SDL.h"
33+
#include "SDL2/SDL_main.h"
3434

3535
#ifdef main
3636
# ifndef _WIN32_WCE_EMULATION

0 commit comments

Comments
 (0)