mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
use system installed sdl on osx
This commit is contained in:
parent
8edfa80028
commit
21445b67bb
13
default.bam
13
default.bam
|
@ -29,6 +29,9 @@ function OptFindSDL(name, required)
|
|||
option.use_sdlconfig = 1
|
||||
end
|
||||
|
||||
if platform == "macosx" then
|
||||
option.value = 1
|
||||
end
|
||||
end
|
||||
|
||||
local apply = function(option, settings)
|
||||
|
@ -36,7 +39,12 @@ function OptFindSDL(name, required)
|
|||
settings.cc.flags = settings.cc.flags .. " -I/usr/include/SDL "
|
||||
settings.linker.flags = settings.linker.flags .. " `sdl-config --libs` "
|
||||
else
|
||||
-- do something else here
|
||||
if platform == "macosx" then
|
||||
client_settings.linker.frameworks:add("SDL")
|
||||
client_settings.cc.includes:add("/Library/Frameworks/SDL.framework/Headers")
|
||||
else
|
||||
-- do something else
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -355,8 +363,7 @@ function build(settings)
|
|||
|
||||
if use_sdl then
|
||||
client_settings.linker.frameworks:add("SDL")
|
||||
client_settings.cc.includes:add("SDL.framework/Headers")
|
||||
client_settings.linker.frameworkpath:add(".")
|
||||
client_settings.cc.includes:add("/Library/Frameworks/SDL.framework/Headers")
|
||||
end
|
||||
else
|
||||
if config.alsa.value == 1 then
|
||||
|
|
|
@ -92,7 +92,8 @@ if use_bundle:
|
|||
shutil.copy("other/icons/Teeworlds.icns", bundle_resource_dir)
|
||||
shutil.copy(name+exe_ext, bundle_bin_dir)
|
||||
shutil.copy(name+"_srv"+exe_ext, bundle_bin_dir)
|
||||
#copydir("SDL.framework", bundle_framework_dir)
|
||||
print(bundle_framework_dir)
|
||||
os.system("cp -R /Library/Frameworks/SDL.framework " + bundle_framework_dir)
|
||||
file(os.path.join(bundle_content_dir, "Info.plist"), "w").write("""
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
|
|
Loading…
Reference in a new issue