Merge with -r 22620:23107.
[blender.git] / source / creator / SConscript
index 412bb82..2760708 100644 (file)
@@ -1,25 +1,42 @@
 #!/usr/bin/python
-Import ('user_options_dict')
-Import ('library_env')
-
-creator_env = library_env.Copy ()
-
-source_files = ['creator.c']
-
-creator_env.Append (CPPPATH = ['#/intern/guardedalloc',
-                               '../blender/blenlib',
-                               '../blender/blenkernel',
-                               '../blender/include',
-                               '../blender/blenloader',
-                               '../blender/imbuf',
-                               '../blender/render/extern/include',
-                               '../blender/python',
-                               '../blender/makesdna',
-                               '../kernel/gen_messaging',
-                               '../kernel/gen_system'])
-creator_env.Append (CPPPATH = user_options_dict['OPENGL_INCLUDE'])
-
-if user_options_dict['USE_QUICKTIME'] == 1:
-    creator_env.Append (CPPDEFINES = ['WITH_QUICKTIME'])
-
-creator_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_creator', source=source_files)
+Import ('env')
+
+sources = ['creator.c']
+
+# if env['BF_UNIT_TEST']:
+#      sources += env.Glob('tests/*.c')
+
+incs = '#/intern/guardedalloc ../blender/blenlib ../blender/blenkernel'
+incs += ' ../blender/editors/include ../blender/blenloader ../blender/imbuf'
+incs += ' ../blender/renderconverter ../blender/render/extern/include ../blender/windowmanager'
+incs += ' ../blender/makesdna ../blender/makesrna ../kernel/gen_messaging'
+incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu'
+incs += ' ' + env['BF_OPENGL_INC']
+
+defs = []
+
+if env['WITH_BF_QUICKTIME']:
+       incs += ' ' + env['BF_QUICKTIME_INC']
+       defs.append('WITH_QUICKTIME')
+
+if env['WITH_BF_BINRELOC']:
+       incs += ' ../../extern/binreloc/include'
+       defs.append('WITH_BINRELOC')
+
+if env['WITH_BF_OPENEXR']:
+       defs.append('WITH_OPENEXR')
+
+if not env['WITH_BF_SDL']:
+       defs.append('DISABLE_SDL')
+
+if env['WITH_BF_PYTHON']:
+       incs += ' ../blender/python'
+       if env['BF_DEBUG']:
+               defs.append('_DEBUG')
+else:
+       defs.append('DISABLE_PYTHON')
+
+# if env['BF_UNIT_TEST']:
+#      defs.append('UNIT_TEST')
+
+env.BlenderLib ( libname = 'bf_creator', sources = sources, includes = Split(incs), defines = defs, libtype='core', priority = 0 )