From 878ede3080ab2cfb627aca505c397d9765052996 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 27 Oct 2009 14:38:53 +0000 Subject: major update with stuff --- other/sdl/sdl.bam | 77 ------------------------------------------------------- other/sdl/sdl.lua | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 other/sdl/sdl.bam create mode 100644 other/sdl/sdl.lua (limited to 'other') diff --git a/other/sdl/sdl.bam b/other/sdl/sdl.bam deleted file mode 100644 index be94209d..00000000 --- a/other/sdl/sdl.bam +++ /dev/null @@ -1,77 +0,0 @@ -SDL = { - basepath = PathPath(ModuleFilename()), - - OptFind = function (name, required) - local check = function(option, settings) - option.value = nil - option.use_sdlconfig = nil - option.use_win32sdl = nil - option.use_osxframework = nil - option.lib_path = nil - - if ExecuteSilent("sdl-config") > 0 and ExecuteSilent("sdl-config --cflags") == 0 then - option.value = 1 - option.use_sdlconfig = 1 - end - - if platform == "win32" then - option.value = 1 - option.use_win32sdl = 1 - end - - if platform == "macosx" then - option.value = 1 - option.use_osxframework = 1 - option.use_sdlconfig = nil - end - end - - local apply = function(option, settings) - if option.use_sdlconfig then - settings.cc.flags:Add("`sdl-config --cflags`") - settings.link.flags:Add("`sdl-config --libs`") - end - - if option.use_osxframework then - client_settings.link.frameworks:Add("SDL") - client_settings.cc.includes:Add("/Library/Frameworks/SDL.framework/Headers") - end - - if option.use_win32sdl then - settings.cc.includes:Add(SDL.basepath .. "/include") - settings.link.libpath:Add(SDL.basepath .. "/vc2005libs") - settings.link.libs:Add("SDL") - settings.link.libs:Add("SDLmain") - end - end - - local save = function(option, output) - output:option(option, "value") - output:option(option, "use_sdlconfig") - output:option(option, "use_win32sdl") - output:option(option, "use_osxframework") - end - - local display = function(option) - if option.value then - if option.use_sdlconfig then return "using sdl-config" end - if option.use_win32sdl then return "using supplied win32 libraries" end - if option.use_osxframework then return "using osx framework" end - return "using unknown method" - else - if option.required then - return "not found (required)" - else - return "not found (optional)" - end - end - end - - local o = MakeOption(name, 0, check, save, display) - o.Apply = apply - o.include_path = nil - o.lib_path = nil - o.required = required - return o - end -} diff --git a/other/sdl/sdl.lua b/other/sdl/sdl.lua new file mode 100644 index 00000000..be94209d --- /dev/null +++ b/other/sdl/sdl.lua @@ -0,0 +1,77 @@ +SDL = { + basepath = PathPath(ModuleFilename()), + + OptFind = function (name, required) + local check = function(option, settings) + option.value = nil + option.use_sdlconfig = nil + option.use_win32sdl = nil + option.use_osxframework = nil + option.lib_path = nil + + if ExecuteSilent("sdl-config") > 0 and ExecuteSilent("sdl-config --cflags") == 0 then + option.value = 1 + option.use_sdlconfig = 1 + end + + if platform == "win32" then + option.value = 1 + option.use_win32sdl = 1 + end + + if platform == "macosx" then + option.value = 1 + option.use_osxframework = 1 + option.use_sdlconfig = nil + end + end + + local apply = function(option, settings) + if option.use_sdlconfig then + settings.cc.flags:Add("`sdl-config --cflags`") + settings.link.flags:Add("`sdl-config --libs`") + end + + if option.use_osxframework then + client_settings.link.frameworks:Add("SDL") + client_settings.cc.includes:Add("/Library/Frameworks/SDL.framework/Headers") + end + + if option.use_win32sdl then + settings.cc.includes:Add(SDL.basepath .. "/include") + settings.link.libpath:Add(SDL.basepath .. "/vc2005libs") + settings.link.libs:Add("SDL") + settings.link.libs:Add("SDLmain") + end + end + + local save = function(option, output) + output:option(option, "value") + output:option(option, "use_sdlconfig") + output:option(option, "use_win32sdl") + output:option(option, "use_osxframework") + end + + local display = function(option) + if option.value then + if option.use_sdlconfig then return "using sdl-config" end + if option.use_win32sdl then return "using supplied win32 libraries" end + if option.use_osxframework then return "using osx framework" end + return "using unknown method" + else + if option.required then + return "not found (required)" + else + return "not found (optional)" + end + end + end + + local o = MakeOption(name, 0, check, save, display) + o.Apply = apply + o.include_path = nil + o.lib_path = nil + o.required = required + return o + end +} -- cgit 1.4.1