diff options
| author | Johan Althoff <teetow@gmail.com> | 2008-10-21 16:31:19 +0000 |
|---|---|---|
| committer | Johan Althoff <teetow@gmail.com> | 2008-10-21 16:31:19 +0000 |
| commit | 6ef507b42dda693752574cf86a57e0da1b8e088c (patch) | |
| tree | fa7dc3dea1af6dfe846cf1e49283ad271fb8c635 /default.bam | |
| parent | 7a32d03b8ab07653baf5a2d786046561b535a3ed (diff) | |
| download | zcatch-6ef507b42dda693752574cf86a57e0da1b8e088c.tar.gz zcatch-6ef507b42dda693752574cf86a57e0da1b8e088c.zip | |
more Windows / SDL fixes
Diffstat (limited to 'default.bam')
| -rw-r--r-- | default.bam | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/default.bam b/default.bam index b51040a2..3c6c285e 100644 --- a/default.bam +++ b/default.bam @@ -19,9 +19,7 @@ function OptFindSDL(name, required) local check = function(option) option.value = nil option.use_sdlconfig = nil - option.cflags = nil - option.libflags = nil - option.include_path = nil + option.use_win32sdl = nil option.lib_path = nil if ExecuteSilent("sdl-config") > 0 and ExecuteSilent("sdl-config --cflags") == 0 then @@ -29,6 +27,11 @@ function OptFindSDL(name, required) option.use_sdlconfig = 1 end + if platform == "win32" then + option.value = 1 + option.use_win32sdl = 1 + end + if platform == "macosx" then option.value = 1 end @@ -42,23 +45,30 @@ function OptFindSDL(name, required) 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 + + if option.use_win32sdl then + settings.cc.includes:add("other/sdl_include") + settings.linker.libpath:add("other/vc2005_sdllibs") + settings.linker.libs:add("SDL") + settings.linker.libs:add("SDLmain") + end end local save = function(option, output) output:option(option, "value") output:option(option, "use_sdlconfig") + output:option(option, "use_win32sdl") end local display = function(option) if option.value then if option.use_sdlconfig then return "using sdl-config" - else - return "some other way" + end + if option.use_win32sdl then + return "using supplied win32 libraries" end else if option.required then @@ -194,6 +204,7 @@ function build(settings) settings.cc.output = intermediate_output_func use_sdl = config.sdl.value + if use_sdl == 0 then use_sdl = nil end if config.compiler.value == "cl" then settings.cc.flags = "/wd4244" @@ -373,9 +384,6 @@ function build(settings) client_settings.linker.libs:add("X11") client_settings.linker.libs:add("GL") client_settings.linker.libs:add("GLU") - - -- apply sdl settings - if use_sdl then config.sdl:apply(client_settings) end end elseif family == "windows" then client_settings.linker.libs:add("opengl32") @@ -386,6 +394,9 @@ function build(settings) client_settings.linker.libs:add("dsound") end end + + -- apply sdl settings + if use_sdl then config.sdl:apply(client_settings) end engine = Compile(engine_settings, Collect("src/engine/*.c", "src/base/*.c")) client = Compile(client_settings, Collect("src/engine/client/*.c")) |