From 483136c8e4d73fafe2b3e0953a6325107558d896 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 11 Nov 2008 14:14:22 +0000 Subject: Adjusted scons files so disabling quicktime, python and sdl also removes their includes when building. writefile.c had usless include. --- SConstruct | 14 ++++++++------ intern/elbeem/SConscript | 2 +- source/blender/blenkernel/SConscript | 9 +++++++-- source/blender/blenlib/SConscript | 4 +++- source/blender/blenloader/SConscript | 1 - source/blender/blenloader/intern/writefile.c | 2 -- source/blender/imbuf/SConscript | 4 ++-- source/blender/nodes/SConscript | 12 ++++++------ source/blender/render/SConscript | 4 ++-- source/blender/src/SConscript | 17 ++++++++++------- source/creator/SConscript | 8 +++++--- source/gameengine/GameLogic/SConscript | 6 ++++-- source/gameengine/Ketsji/SConscript | 4 +++- 13 files changed, 51 insertions(+), 36 deletions(-) diff --git a/SConstruct b/SConstruct index 968266bd6d1..3fe25ccfa5f 100644 --- a/SConstruct +++ b/SConstruct @@ -517,15 +517,17 @@ else: if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll', '${LCGDIR}/png/lib/libpng.dll', - '#release/windows/extra/python25.zip', '#release/windows/extra/zlib.pyd', - '${LCGDIR}/sdl/lib/SDL.dll', '${LCGDIR}/zlib/lib/zlib.dll', '${LCGDIR}/tiff/lib/libtiff.dll'] - if env['BF_DEBUG']: - dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}_d.dll') - else: - dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}.dll') + if env['WITH_BF_SDL']: + dllsources.append('${LCGDIR}/sdl/lib/SDL.dll') + if env['WITH_BF_PYTHON']: + dllsources.append('#release/windows/extra/python25.zip') + if env['BF_DEBUG']: + dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}_d.dll') + else: + dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}.dll') if env['OURPLATFORM'] == 'win32-mingw': dllsources += ['${LCGDIR}/pthreads/lib/pthreadGC2.dll'] else: diff --git a/intern/elbeem/SConscript b/intern/elbeem/SConscript index f1c09423f04..dc8d84ef5a0 100644 --- a/intern/elbeem/SConscript +++ b/intern/elbeem/SConscript @@ -12,7 +12,7 @@ if env['WITH_BF_OPENMP']: if env['OURPLATFORM']=='win32-vc': defs += ' USE_MSVC6FIXES' -incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] + ' ' +env['BF_SDL_INC'] +incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] incs += ' extern ' env.BlenderLib ('bf_elbeem', sources, Split(incs), Split(defs), libtype='blender', priority=0 ) diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 4c5cd51b836..ab122e40bfc 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -6,7 +6,7 @@ sources = env.Glob('intern/*.c') incs = '. #/intern/guardedalloc ../include ../blenlib ../makesdna' incs += ' ../render/extern/include #/intern/decimation/extern' incs += ' ../imbuf ../avi #/intern/elbeem/extern ../nodes' -incs += ' #/intern/iksolver/extern ../blenloader ../quicktime' +incs += ' #/intern/iksolver/extern ../blenloader' incs += ' #/extern/bullet2/src' incs += ' #/intern/bmfont' incs += ' #/intern/opennl/extern' @@ -14,7 +14,6 @@ incs += ' ../gpu #/extern/glew/include' incs += ' ' + env['BF_OPENGL_INC'] incs += ' ' + env['BF_ZLIB_INC'] -incs += ' ' + env['BF_SDL_INC'] defs = '' @@ -24,6 +23,12 @@ else: incs += ' ../python' incs += ' ' + env['BF_PYTHON_INC'] +if env['WITH_BF_QUICKTIME']: + incs += ' ../quicktime' + +if env['WITH_BF_SDL']: + incs += ' ' + env['BF_SDL_INC'] + if env['WITH_BF_INTERNATIONAL']: defs += ' WITH_FREETYPE2' diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript index e7a4f2eaf13..0dc28960492 100644 --- a/source/blender/blenlib/SConscript +++ b/source/blender/blenlib/SConscript @@ -7,9 +7,11 @@ cflags='' incs = '. ../makesdna ../blenkernel #/intern/guardedalloc ../include' incs += ' ' + env['BF_FREETYPE_INC'] incs += ' ' + env['BF_ZLIB_INC'] -incs += ' ' + env['BF_SDL_INC'] defs = '' +if env['WITH_BF_SDL']: + incs += ' ' + env['BF_SDL_INC'] + if env['WITH_BF_INTERNATIONAL']: defs = 'WITH_FREETYPE2' diff --git a/source/blender/blenloader/SConscript b/source/blender/blenloader/SConscript index fb36b15e3e7..e4e39e6cac4 100644 --- a/source/blender/blenloader/SConscript +++ b/source/blender/blenloader/SConscript @@ -5,7 +5,6 @@ sources = env.Glob('intern/*.c') incs = '. #/intern/guardedalloc ../blenlib ../blenkernel' incs += ' ../makesdna ../readblenfile ../include' -incs += ' ../python ../../kernel/gen_messaging' incs += ' ../render/extern/include' incs += ' ' + env['BF_ZLIB_INC'] diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 3c2ca92f3fc..e9d9fae0936 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -174,8 +174,6 @@ Important to know is that 'streaming' has been added to files, for Blender Publi #include "BIF_verse.h" #endif -#include "GEN_messaging.h" - #include "BLO_writefile.h" #include "BLO_readfile.h" #include "BLO_undofile.h" diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript index 4eba4a843b2..a8c49c0394e 100644 --- a/source/blender/imbuf/SConscript +++ b/source/blender/imbuf/SConscript @@ -4,7 +4,7 @@ Import ('env') sources = env.Glob('intern/*.c') incs = '. ../makesdna #/intern/guardedalloc #/intern/memutil ../blenlib' -incs += ' ../avi ../quicktime ../blenkernel' +incs += ' ../avi ../blenkernel' incs += ' ' + env['BF_JPEG_INC'] incs += ' ' + env['BF_PNG_INC'] @@ -36,7 +36,7 @@ if env['WITH_BF_REDCODE']: incs += ' ' + env['BF_REDCODE_INC'] if env['WITH_BF_QUICKTIME']: - incs += ' ' + env['BF_QUICKTIME_INC'] + incs += ' ../quicktime ' + env['BF_QUICKTIME_INC'] defs.append('WITH_QUICKTIME') env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [80, 40] ) diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript index 038ce4b749e..0cfef20dae7 100644 --- a/source/blender/nodes/SConscript +++ b/source/blender/nodes/SConscript @@ -7,21 +7,21 @@ sources += env.Glob('intern/SHD_nodes/*.c') incs = '. ./intern ' incs += '#/intern/guardedalloc ../include ../blenlib ../makesdna' -incs += ' ../python ../render/extern/include ' +incs += ' ../render/extern/include ' incs += ' ../imbuf ../avi ' -incs += ' ../blenloader ../quicktime' +incs += ' ../blenloader' incs += ' ../blenkernel ../renderconverter ' incs += ' ../gpu #/extern/glew/include ' - -incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_OPENGL_INC'] incs += ' ' + env['BF_ZLIB_INC'] -incs += ' ' + env['BF_SDL_INC'] defs = '' -if not env['WITH_BF_PYTHON']: +if env['WITH_BF_PYTHON']: + incs += ' ' + env['BF_PYTHON_INC'] + incs += ' ../python' +else: defs += 'DISABLE_PYTHON' if env['WITH_BF_INTERNATIONAL']: diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript index 607ddf5c7a3..50c4b554193 100644 --- a/source/blender/render/SConscript +++ b/source/blender/render/SConscript @@ -6,7 +6,7 @@ sources = env.Glob('intern/source/*.c') incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna' incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf' -incs += ' ../quicktime ../include ../../kernel/gen_messaging ../blenloader' +incs += ' ../include ../blenloader' defs = [] @@ -17,7 +17,7 @@ else: if env['WITH_BF_QUICKTIME']: defs.append('WITH_QUICKTIME') - incs += ' ' + env['BF_QUICKTIME_INC'] + incs += ' ../quicktime ' + env['BF_QUICKTIME_INC'] if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript index 4ebaad673f2..b95e4f096b1 100644 --- a/source/blender/src/SConscript +++ b/source/blender/src/SConscript @@ -23,22 +23,22 @@ incs = ' #/intern/guardedalloc #/intern/memutil' incs += ' ../blenlib ../makesdna ../blenkernel' incs += ' ../include #/intern/bmfont ../imbuf ../render/extern/include' incs += ' #/intern/bsp/extern ../radiosity/extern/include' -incs += ' #/intern/decimation/extern ../blenloader ../python' +incs += ' #/intern/decimation/extern ../blenloader' incs += ' ../../kernel/gen_system #/intern/SoundSystem ../readstreamglue ../nodes' -incs += ' ../quicktime #/intern/elbeem/extern' +incs += ' #/intern/elbeem/extern' incs += ' #/intern/ghost #/intern/opennl/extern' incs += ' ../gpu #extern/glew/include' - -incs += ' ' + env['BF_PYTHON_INC'] -incs += ' ' + env['BF_SDL_INC'] incs += ' ' + env['BF_OPENGL_INC'] defs = [] -if not env['WITH_BF_PYTHON']: +if env['WITH_BF_PYTHON']: + incs += ' ../python ' + env['BF_PYTHON_INC'] +else: defs.append('DISABLE_PYTHON') + if env['BF_TWEAK_MODE']: defs.append('TWEAK_MODE') @@ -61,6 +61,7 @@ if env['WITH_BF_QUICKTIME']: defs.append('WITH_QUICKTIME') if env['WITH_BF_ICONV']: + incs += ' ../quicktime' incs += ' ' + env['BF_ICONV_INC'] defs.append('WITH_ICONV') @@ -85,7 +86,9 @@ if env['BF_BUILDINFO']: if env['BF_NO_ELBEEM']: defs.append('DISABLE_ELBEEM') -if not env['WITH_BF_SDL']: +if env['WITH_BF_SDL']: + incs += ' ' + env['BF_SDL_INC'] +else: defs.append('DISABLE_SDL') if env['BF_SPLIT_SRC'] and (env['OURPLATFORM'] == 'win32-mingw'): diff --git a/source/creator/SConscript b/source/creator/SConscript index 16556643707..505b69b8e6d 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -6,7 +6,7 @@ sources = 'creator.c' incs = '#/intern/guardedalloc ../blender/blenlib ../blender/blenkernel' incs += ' ../blender/include ../blender/blenloader ../blender/imbuf' incs += ' ../blender/renderconverter ../blender/render/extern/include' -incs += ' ../blender/python ../blender/makesdna ../kernel/gen_messaging' +incs += ' ../blender/makesdna ../kernel/gen_messaging' incs += ' ../kernel/gen_system #/extern/glew/include ../blender/gpu' incs += ' ' + env['BF_OPENGL_INC'] @@ -25,7 +25,9 @@ if env['WITH_BF_OPENEXR']: if not env['WITH_BF_SDL']: defs.append('DISABLE_SDL') -if not env['WITH_BF_PYTHON']: - defs.append('DISABLE_PYTHON') +if env['WITH_BF_PYTHON']: + incs += ' ../blender/python' +else: + defs.append('DISABLE_PYTHON') env.BlenderLib ( libname = 'blender_creator', sources = Split(sources), includes = Split(incs), defines = defs, libtype='core', priority = 1 ) diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript index fa5a3123215..b4e2159dc22 100644 --- a/source/gameengine/GameLogic/SConscript +++ b/source/gameengine/GameLogic/SConscript @@ -8,11 +8,13 @@ incs += ' #/source/gameengine/Expressions #/intern/moto/include' incs += ' #/source/gameengine/Rasterizer' incs += ' ' + env['BF_PYTHON_INC'] -incs += ' ' + env['BF_SDL_INC'] + defs = '' -if not env['WITH_BF_SDL']: +if env['WITH_BF_SDL']: + incs += ' ' + env['BF_SDL_INC'] +else: defs += ' DISABLE_SDL' env.BlenderLib ( 'bf_logic', sources, Split(incs), Split(defs), libtype=['game','player'], priority=[30, 110] ) diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index 02e7aed82a5..f5c620b583f 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -41,8 +41,10 @@ if env['OURPLATFORM'] == 'win32-vc': incs += ' ' + env['BF_SOLID_INC'] incs += ' ' + env['BF_PYTHON_INC'] -incs += ' ' + env['BF_SDL_INC'] incs += ' ' + env['BF_BULLET_INC'] incs += ' ' + env['BF_OPENGL_INC'] +if env['WITH_BF_SDL']: + incs += ' ' + env['BF_SDL_INC'] + env.BlenderLib ( 'bf_ketsji', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags ) -- cgit v1.2.3