* 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.
This commit is contained in:
Nathan Letwory
2008-11-04 23:04:15 +00:00
parent 2d80262759
commit beea73b110
6 changed files with 32 additions and 21 deletions

View File

@@ -150,6 +150,11 @@ BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
BF_QUICKTIME_LIB = 'qtmlClient'
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
WITH_BF_OPENJPEG = True
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'

View File

@@ -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)

View File

@@ -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 = [])

View File

@@ -1,4 +1,9 @@
#ifdef _WIN32
#include <Winsock2.h>
#else
#include <netinet/in.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -82,7 +82,11 @@
#endif
#ifdef WITH_REDCODE
#include <redcode/format.h>
#ifdef _WIN32 /* on windows we use the one in extern instead */
#include "libredcode/format.h"
#else
#include "libredcode/format.h"
#endif
#endif
#include "IMB_imbuf_types.h"

View File

@@ -97,8 +97,13 @@
#endif
#ifdef WITH_REDCODE
#include <redcode/format.h>
#include <redcode/codec.h>
#ifdef _WIN32 /* on windows we use the ones in extern instead */
#include "libredcode/format.h"
#include "libredcode/codec.h"
#else
#include "libredcode/format.h"
#include "libredcode/codec.h"
#endif
#endif
/****/