Merge of itasc branch. Project files, scons and cmake should be working. Makefile...
[blender.git] / source / blender / makesrna / intern / SConscript
index 03f0afd..0f8bc75 100644 (file)
@@ -6,7 +6,7 @@ def normpath(path):
        return os.path.abspath(os.path.normpath(path))
 
 Import ('env')
-cflags = '-Wall'
+cflags = ['-Wall']
 defines = []
 root_build_dir=normpath(env['BF_BUILDDIR'])
 
@@ -29,6 +29,11 @@ makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" '
 
 defs = []
 
+incs = '#/intern/guardedalloc ../../blenlib ../../blenkernel'
+incs += ' ../../imbuf ../../makesdna ../../makesrna ../../ikplugin'
+incs += ' ../../windowmanager ../../editors/include'
+incs += ' ../../render/extern/include'
+
 if env['WITH_BF_OPENEXR']:
        defs.append('WITH_OPENEXR')
 
@@ -40,6 +45,10 @@ if env['WITH_BF_DDS']:
 
 if env['WITH_BF_FFMPEG']:
        defs.append('WITH_FFMPEG')
+       incs += ' ' + env['BF_FFMPEG_INC']
+
+if env['WITH_BF_OGG']:
+       defs.append('WITH_OGG')
 
 if env['WITH_BF_QUICKTIME']:
        defs.append('WITH_QUICKTIME')
@@ -47,16 +56,27 @@ if env['WITH_BF_QUICKTIME']:
 if env['WITH_BF_LCMS']:
        defs.append('WITH_LCMS')
 
+if env['WITH_BF_GAMEENGINE']:
+       defs.append('GAMEBLENDER=1')
+       
+if env['WITH_BF_FFTW3']:
+    defs.append('FFTW3=1')
+
+if env['WITH_BF_SDL']:
+    defs.append('WITH_SDL')
+
+if env['WITH_BF_OPENAL']:
+    defs.append('WITH_OPENAL')
+
+if env['WITH_BF_JACK']:
+    defs.append('WITH_JACK')
+
+if env['BF_UNIT_TEST']:
+       defs.append('UNIT_TEST')
+
 makesrna_tool.Append(CPPDEFINES=defs)
 
-makesrna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
-                                                                '../../blenlib',
-                                                                '../../blenkernel',
-                                                                '../../imbuf',
-                                                                '../../makesdna',
-                                                                '../../makesrna',
-                                                                '../../windowmanager',
-                                                                '../../editors/include'])
+makesrna_tool.Append (CPPPATH = Split(incs))
 
 if env['OURPLATFORM'] == 'linuxcross':
        USE_WINE = True # when cross compiling on linux 64bit this is useful
@@ -79,13 +99,17 @@ if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
 
 makesrna_tool.Append (LIBPATH = libdir)
 
+makesrna_tool.Append( CFLAGS = env['CFLAGS'])
+makesrna_tool.Append( CCFLAGS = env['CCFLAGS'])
+makesrna_tool.Append( LINKFLAGS = env['PLATFORM_LINKFLAGS'])
+
 if env['BF_PROFILE']:
        makesrna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS'])
 
 if env['BF_DEBUG']:
        makesrna_tool.Append(CFLAGS = env['BF_DEBUG_CFLAGS'])
        makesrna_tool.Append(CCFLAGS = env['BF_DEBUG_CCFLAGS'])
-       if env['OURPLATFORM'] == 'win32-vc':
+       if env['OURPLATFORM'] in ('win32-vc','win64-vc'):
                makesrna_tool.Append(LINKFLAGS = ['/DEBUG','/PDB:makesrna.pdb'])
 
 targetpath = root_build_dir+'/makesrna'