From beea73b110a7b3ad983a09c7e41b503cee590ebd Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Tue, 4 Nov 2008 23:04:15 +0000 Subject: * enable openjpeg building for win32/msvc * add support for building redcode on win32/msvc, but disabled for now, as there are linking problems - I cleaned the redcode sconscript - the copying of headers within the source tree is not a clean solution This needs to be fixed later on. For now, lets use redcode from extern/ until a better way is found. --- extern/libopenjpeg/SConscript | 14 +++++++++----- extern/libredcode/SConscript | 14 +------------- extern/libredcode/format.c | 5 +++++ 3 files changed, 15 insertions(+), 18 deletions(-) (limited to 'extern') diff --git a/extern/libopenjpeg/SConscript b/extern/libopenjpeg/SConscript index f0a93f6e2d9..7100ecb37fd 100644 --- a/extern/libopenjpeg/SConscript +++ b/extern/libopenjpeg/SConscript @@ -7,14 +7,18 @@ Import('env') sources = env.Glob('*.c') incs = '.' -flags = "-Wall -O3 -ffast-math -std=c99" +if env['OURPLATFORM'] == 'win32-vc': + flags = [] +else: + flags = ['-Wall', '-O3', '-ffast-math', '-std=c99'] -oj_env = env.Copy(); -oj_env.Replace(CCFLAGS = '') -oj_env.Replace(BF_DEBUG_FLAGS = '') +oj_env = env.Clone() +if not env['OURPLATFORM'] == 'win32-vc': + oj_env.Replace(CCFLAGS = '') + oj_env.Replace(BF_DEBUG_FLAGS = '') oj_env.BlenderLib ( libname='extern_openjpeg', sources=sources, includes=Split(incs), defines=[], libtype=['core','intern','player'], - priority=[10, 10, 300], compileflags = Split(flags)) + priority=[5, 10, 200], compileflags = flags) diff --git a/extern/libredcode/SConscript b/extern/libredcode/SConscript index 4e83ba5cbb4..b58e6d5fe25 100644 --- a/extern/libredcode/SConscript +++ b/extern/libredcode/SConscript @@ -9,20 +9,8 @@ Import('env') sources = env.Glob('*.c') incs = '. ../libopenjpeg' -root = "extern/libredcode" - -if not os.path.isdir(root + "/include"): - os.mkdir(root + "/include"); -if not os.path.isdir(root + "/include/redcode"): - os.mkdir(root + "/include/redcode"); - -for h in env.Glob('*.h'): - shutil.copyfile(root + "/" + h, - root + "/include/redcode/" + h) - - env.BlenderLib ( libname='extern_redcode', sources=sources, includes=Split(incs), defines=[], libtype=['core','intern','player'], - priority=[5, 5, 200], compileflags = []) + priority=[10, 5, 300], compileflags = []) diff --git a/extern/libredcode/format.c b/extern/libredcode/format.c index 35410e9e269..4677c49b8a5 100644 --- a/extern/libredcode/format.c +++ b/extern/libredcode/format.c @@ -1,4 +1,9 @@ +#ifdef _WIN32 +#include +#else #include +#endif + #include #include #include -- cgit v1.2.3