Smoke:
authorDaniel Genrich <daniel.genrich@gmx.net>
Sun, 9 Aug 2009 10:55:25 +0000 (10:55 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Sun, 9 Aug 2009 10:55:25 +0000 (10:55 +0000)
* WITH_BF_FFTW3 flag --> fftw3 scons + cmake settings refined.
* Disabled by default since mac + win32 libs missing. Works already on win64 + linux (with installed fftw3 libs)

CMake/macros.cmake
config/darwin-config.py
config/linux2-config.py
config/win32-vc-config.py
config/win64-vc-config.py
intern/smoke/CMakeLists.txt
intern/smoke/SConscript
source/blender/makesrna/SConscript
tools/Blender.py
tools/btools.py

index 44fc2903875fca1023fd542bb3e98064b5117f69..8744fc2cdf9ba2662eeac4207c69d84e0c9f90ce 100644 (file)
@@ -50,6 +50,9 @@ MACRO(SETUP_LIBDIRS)
   IF(WITH_OPENAL)
     LINK_DIRECTORIES(${OPENAL_LIBPATH})
   ENDIF(WITH_OPENAL)
+  IF(WITH_FFTW3)
+    LINK_DIRECTORIES(${FFTW3_LIBPATH})
+  ENDIF(WITH_FFTW3)    
 
   IF(WIN32)
     LINK_DIRECTORIES(${PTHREADS_LIBPATH})
@@ -61,7 +64,7 @@ MACRO(SETUP_LIBLINKS
   SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
   #TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
 
-  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIB} ${LLIBS})
+  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${FFTW3_LIB} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIB} ${LLIBS})
 
   # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
 
index 171552d0822201a5003bfb1d57f5717bf16f4b0c..0b1c2f7574400cd52430558da872ec2ed43badb4 100644 (file)
@@ -169,6 +169,12 @@ BF_BULLET = '#extern/bullet2/src'
 BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
+WITH_BF_FFTW3 = False
+BF_FFTW3 = LIBDIR + '/fftw3'
+BF_FFTW3_INC = '${BF_FFTW3}/include'
+BF_FFTW3_LIB = 'libfftw'
+BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
+
 #WITH_BF_NSPR = True
 #BF_NSPR = $(LIBDIR)/nspr
 #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
index 6b6373bb00128888396ddffb01dff916c9439e15..62a7667d8e7928e63ffc40c9a2f628cb82da60d3 100644 (file)
@@ -130,6 +130,12 @@ BF_OPENJPEG_LIB = ''
 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
 
+WITH_BF_FFTW3 = False
+BF_FFTW3 = LIBDIR + '/usr'
+BF_FFTW3_INC = '${BF_FFTW3}/include'
+BF_FFTW3_LIB = 'fftw3'
+BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
+
 WITH_BF_REDCODE = False  
 BF_REDCODE = '#extern/libredcode'
 BF_REDCODE_LIB = ''
index c226a2dca18cf747967e01f48da6b75a79e153ad..4e2a735243a613667aade50d913fe95565f1695f 100644 (file)
@@ -133,6 +133,12 @@ BF_OPENJPEG_LIB = ''
 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
 
+WITH_BF_FFTW3 = False
+BF_FFTW3 = LIBDIR + '/fftw3'
+BF_FFTW3_INC = '${BF_FFTW3}/include'
+BF_FFTW3_LIB = 'libfftw'
+BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
+
 WITH_BF_REDCODE = False  
 BF_REDCODE_INC = '#extern'
 
index 697b9141d14920c2c70e926e262d056ba49552f4..56ea356715bfc15bbc6a0d574701d6ed151ceb53 100644 (file)
@@ -136,6 +136,12 @@ BF_OPENJPEG_LIB = ''
 BF_OPENJPEG_INC = '${BF_OPENJPEG}'
 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
 
+WITH_BF_FFTW3 = True
+BF_FFTW3 = LIBDIR + '/fftw3'
+BF_FFTW3_INC = '${BF_FFTW3}/include'
+BF_FFTW3_LIB = 'libfftw'
+BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
+
 WITH_BF_REDCODE = False  
 BF_REDCODE_INC = '#extern'
 
index 221bc911d20fbe7629a8ed4d299610e2319117d9..0db6acb683f103ce19329641a2e0d23f4e085330 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC ${PNG_INC} ${ZLIB_INC} intern ../../extern/bullet2/src ../memutil ../guardealloc ${FFTW3_INC})
+SET(INC ${PNG_INC} ${ZLIB_INC} intern ../../extern/bullet2/src ../memutil ../guardealloc)
 
 FILE(GLOB SRC intern/*.cpp)
 
@@ -34,6 +34,7 @@ ENDIF(WITH_OPENMP)
 
 IF(WITH_FFTW3)
   ADD_DEFINITIONS(-DFFTW3=1)
+  SET(INC ${INC} ${FFTW3_INC})
 ENDIF(WITH_FFTW3)
 
 
index c427764e19e720c23b3c5b2ddd28634fd0f12060..ba8a7932e038d8aded058f69cb65f658c91584da 100644 (file)
@@ -10,6 +10,9 @@ if env['WITH_BF_OPENMP']:
 
 incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] 
 incs += ' intern ../../extern/bullet2/src ../memutil ../guardealloc '
-# incs += env['BF_FFTW3_INC'] 
+
+if env['WITH_BF_FFTW3']:
+    defs += ' FFTW3=1'
+       incs += env['BF_FFTW3_INC'] 
 
 env.BlenderLib ('bf_smoke', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] )
index 80abd4fda61476e491550aef5a71bf45b1c5a6f8..38008e4ecdccaa757ba17666d1da97eb32df79f6 100644 (file)
@@ -36,5 +36,8 @@ if env['WITH_BF_LCMS']:
 
 if env['WITH_BF_GAMEENGINE']:
        defs.append('GAMEBLENDER=1')
+       
+if env['WITH_BF_FFTW3']:
+    defs.append('FFTW3=1')
 
 env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core'], priority = [195] )
index 6bb77e3cc852929ef3e120d8c2daabc975b8a98a..c150390403793fe51a151a80acf44cc96b93794b 100644 (file)
@@ -131,6 +131,8 @@ def setup_staticlibs(lenv):
                libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
                if lenv['WITH_BF_STATICOPENEXR']:
                        statlibs += Split(lenv['BF_OPENEXR_LIB_STATIC'])
+       if lenv['WITH_BF_FFTW3']:
+               libincs += Split(lenv['BF_FFTW3_LIBPATH'])
        if lenv['WITH_BF_INTERNATIONAL']:
                libincs += Split(lenv['BF_GETTEXT_LIBPATH'])
        if lenv['WITH_BF_OPENAL']:
@@ -183,6 +185,8 @@ def setup_syslibs(lenv):
                syslibs += Split(lenv['BF_FFMPEG_LIB'])
                if lenv['WITH_BF_OGG']:
                        syslibs += Split(lenv['BF_OGG_LIB'])
+       if lenv['WITH_BF_FFTW3']:
+               syslibs += Split(lenv['BF_FFTW3_LIB'])
        if lenv['WITH_BF_SDL']:
                syslibs += Split(lenv['BF_SDL_LIB'])
        if not lenv['WITH_BF_STATICOPENGL']:
index 9603022deaa554f36a1d758f11fcbf560efd0e1a..0f86d9247383a0d445f478c8e96edfe35061d7ed 100755 (executable)
@@ -48,6 +48,7 @@ def validate_arguments(args, bc):
                        'BF_WINTAB', 'BF_WINTAB_INC',
                        'WITH_BF_FREETYPE', 'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH',
                        'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
+                       'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH',
                        'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
                        'WITH_BF_PLAYER',
                        'WITH_BF_NOBLENDER',
@@ -291,6 +292,12 @@ def read_opts(cfg, args):
                ('BF_QUICKTIME_INC', 'QuickTime include path', ''),
                ('BF_QUICKTIME_LIB', 'QuickTime library', ''),
                ('BF_QUICKTIME_LIBPATH', 'QuickTime library path', ''),
+               
+               (BoolVariable('WITH_BF_FFTW3', 'Use FFTW3 if true', False)),
+               ('BF_FFTW3', 'FFTW3 base path', ''),
+               ('BF_FFTW3_INC', 'FFTW3 include path', ''),
+               ('BF_FFTW3_LIB', 'FFTW3 library', ''),
+               ('BF_FFTW3_LIBPATH', 'FFTW3 library path', ''),
 
                (BoolVariable('WITH_BF_STATICOPENGL', 'Use MESA if true', True)),
                ('BF_OPENGL', 'OpenGL base path', ''),