diff options
author | 2016-02-28 15:07:43 +0100 | |
---|---|---|
committer | 2016-02-28 15:07:43 +0100 | |
commit | 1adc64573f595012e0b7b9a91f60a18bee23bb0d (patch) | |
tree | 3e401701b675a8c4be34f3603b23556e68f5fb1d /scripts/src | |
parent | a17d1385c44228d21829098a50cdef08f6f795d2 (diff) |
compiles but crash on OSX with bundled one (nw)
Diffstat (limited to 'scripts/src')
-rw-r--r-- | scripts/src/3rdparty.lua | 15 | ||||
-rw-r--r-- | scripts/src/osd/sdl.lua | 24 | ||||
-rw-r--r-- | scripts/src/osd/sdl_cfg.lua | 26 |
3 files changed, 48 insertions, 17 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 869ae05a0a2..83f45927a1c 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -1588,6 +1588,7 @@ project "SDL2" defines { "HAVE_LIBC", } + configuration { "mingw*"} includedirs { MAME_DIR .. "3rdparty/SDL2-override/mingw", @@ -1600,6 +1601,20 @@ project "SDL2" "-Wno-discarded-qualifiers", "-Wno-unused-but-set-variable", } + + configuration { "osx*"} + buildoptions { + "-Wno-undef", + } + buildoptions_objc { + "-x objective-c", + "-std=c99", + } + + buildoptions_c { + "-Wno-bad-function-cast", + } + configuration { } includedirs { diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index ae7ff14b99c..9b5ffb195d8 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -115,8 +115,16 @@ function maintargetosdoptions(_target,_subtarget) links { "psapi" } - configuration { } + + if _OPTIONS["targetos"]=="macosx" then + if _OPTIONS["with-bundled-sdl2"]~=nil then + links { + "SDL2", + } + end + end + end @@ -243,7 +251,6 @@ if _OPTIONS["with-bundled-sdl2"]~=nil then GEN_DIR .. "includes", } end - if BASE_TARGETOS=="unix" then if _OPTIONS["targetos"]=="macosx" then local os_version = str_to_version(backtick("sw_vers -productVersion")) @@ -255,15 +262,22 @@ if BASE_TARGETOS=="unix" then "-framework QuartzCore", "-framework OpenGL", } + + if os_version>=101100 then linkoptions { "-weak_framework Metal", } end if _OPTIONS["with-bundled-sdl2"]~=nil then - links { - "SDL2", - } + linkoptions { + "-framework AudioUnit", + "-framework CoreAudio", + "-framework Carbon", + "-framework ForceFeedback", + "-framework IOKit", + "-framework CoreVideo", + } else if _OPTIONS["USE_LIBSDL"]~="1" then linkoptions { diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua index 8f9b9d29578..641a00b924e 100644 --- a/scripts/src/osd/sdl_cfg.lua +++ b/scripts/src/osd/sdl_cfg.lua @@ -75,18 +75,20 @@ if BASE_TARGETOS=="unix" then "SDLMAME_UNIX", } if _OPTIONS["targetos"]=="macosx" then - if _OPTIONS["USE_LIBSDL"]~="1" then - buildoptions { - "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], - } - else - defines { - "MACOSX_USE_LIBSDL", - } - buildoptions { - backtick(sdlconfigcmd() .. " --cflags | sed 's:/SDL::'"), - } - end + if _OPTIONS["with-bundled-sdl2"]==nil then + if _OPTIONS["USE_LIBSDL"]~="1" then + buildoptions { + "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"], + } + else + defines { + "MACOSX_USE_LIBSDL", + } + buildoptions { + backtick(sdlconfigcmd() .. " --cflags | sed 's:/SDL::'"), + } + end + end else buildoptions { backtick(sdlconfigcmd() .. " --cflags"), |