* r22739 broke compilation with scons. Make sure WITH_OPENEXR definition is given
[blender.git] / source / blender / imbuf / SConscript
index 11d7cfb2b30854dda0a014fba71e98351c5913d6..9da0cf2159609a18e76b087df6b71209540b74cf 100644 (file)
@@ -1,48 +1,38 @@
 #!/usr/bin/python
-Import ('extra_includes')
-Import ('user_options_dict')
-Import ('library_env')
-
-imbuf_env = library_env.Copy ()
-
-source_files = ['intern/allocimbuf.c',
-                'intern/amiga.c',
-                'intern/anim.c',
-                'intern/anim5.c',
-                'intern/antialias.c',
-                'intern/bitplanes.c',
-                'intern/bmp.c',
-                'intern/cmap.c',
-                'intern/cspace.c',
-                'intern/data.c',
-                'intern/dither.c',
-                'intern/divers.c',
-                'intern/filter.c',
-                'intern/ham.c',
-                'intern/hamx.c',
-                'intern/iff.c',
-                'intern/imageprocess.c',
-                'intern/iris.c',
-                'intern/jpeg.c',
-                'intern/png.c',
-                'intern/readimage.c',
-                'intern/rectop.c',
-                'intern/rotate.c',
-                'intern/scaling.c',
-                'intern/targa.c',
-                'intern/util.c',
-                'intern/writeimage.c']
-
-imbuf_env.Append (CPPPATH = ['.',
-                             '../makesdna',
-                             '#/intern/guardedalloc',
-                             '../blenlib',
-                             '../avi',
-                             '../quicktime',
-                             '../blenkernel'])
-
-imbuf_env.Append (CPPPATH = user_options_dict['JPEG_INCLUDE'])
-imbuf_env.Append (CPPPATH = user_options_dict['PNG_INCLUDE'])
-imbuf_env.Append (CPPPATH = user_options_dict['Z_INCLUDE'])
-imbuf_env.Append (CPPPATH = extra_includes)
-imbuf_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_imbuf', source=source_files)
+Import ('env')
+
+sources = env.Glob('intern/*.c')
+
+incs = '. ../makesdna #/intern/guardedalloc #/intern/memutil ../blenlib'
+incs += ' ../avi ../blenkernel'
+
+incs += ' ' + env['BF_JPEG_INC']
+incs += ' ' + env['BF_PNG_INC']
+incs += ' ' + env['BF_TIFF_INC']
+incs += ' ' + env['BF_ZLIB_INC']
+
+defs = []
+
+if env['WITH_BF_OPENEXR']:
+    defs.append('WITH_OPENEXR')
+
+if env['WITH_BF_DDS']:
+    defs.append('WITH_DDS')
+
+if env['WITH_BF_FFMPEG']:
+    defs.append('WITH_FFMPEG')
+    incs += ' ' + env['BF_FFMPEG_INC']
+
+if env['WITH_BF_OPENJPEG']:
+    defs.append('WITH_OPENJPEG')
+    incs += ' ' + env['BF_OPENJPEG_INC']
+
+if env['WITH_BF_REDCODE']:
+    defs.append('WITH_REDCODE')
+    incs += ' ' + env['BF_REDCODE_INC']
+
+if env['WITH_BF_QUICKTIME']:
+       incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']
+       defs.append('WITH_QUICKTIME')
+
+env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [190] )