From 874d454d67a25ac0a00ba558572c25342cdbaa3c Mon Sep 17 00:00:00 2001 From: Michel Selten Date: Mon, 23 Feb 2004 14:39:08 +0000 Subject: [PATCH] SCons updates * Removed the I18N_DEFINES from the config.opts file. This define is not a user setting. The defines depend on what options the user enables in the top of the config.opts file (USE_INTERNATIONAL). * Moved the defines to the correct SConscript files. Only the relevant libraries now use these defines. * Windows fix for the python settings. There were missing brackets [ and ] for these settings. --- SConstruct | 16 +++------------- source/blender/blenkernel/SConscript | 3 +++ source/blender/blenlib/SConscript | 3 +++ source/blender/ftfont/SConscript | 1 + source/blender/src/SConscript | 2 ++ 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/SConstruct b/SConstruct index 8efa28e3b32..0e39d5785c9 100644 --- a/SConstruct +++ b/SConstruct @@ -82,7 +82,6 @@ if sys.platform == 'linux2': gettext_lib = [] gettext_libpath = [] gettext_include = [] - i18n_defines = ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] elif sys.platform == 'darwin': use_international = 'false' @@ -159,7 +158,6 @@ elif sys.platform == 'darwin': gettext_lib = [] gettext_libpath = [] gettext_include = [] - i18n_defines = [] elif sys.platform == 'cygwin': use_international = 'false' @@ -289,9 +287,9 @@ elif sys.platform == 'win32': ode_libpath = ['#../lib/windows/ode/lib'] ode_include = ['#../lib/windows/ode/include'] # Python lib name - python_include = '#../lib/windows/python/include/python2.2' - python_libpath = '#../lib/windows/python/lib' - python_lib = 'python22' + python_include = ['#../lib/windows/python/include/python2.2'] + python_libpath = ['#../lib/windows/python/lib'] + python_lib = ['python22'] # International stuff ftgl_lib = ['ftgl_static_ST'] ftgl_libpath = ['#../lib/windows/ftgl/lib'] @@ -302,7 +300,6 @@ elif sys.platform == 'win32': gettext_lib = ['gnu_gettext'] gettext_libpath = ['#../lib/windows/gettext/lib'] gettext_include = ['#../lib/windows/gettext/include'] - i18n_defines = ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] elif string.find (sys.platform, 'sunos') != -1: use_international = 'true' @@ -372,7 +369,6 @@ elif string.find (sys.platform, 'sunos') != -1: gettext_lib = [] gettext_libpath = [] gettext_include = [] - i18n_defines = ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] elif string.find (sys.platform, 'irix') != -1: use_international = 'false' @@ -447,7 +443,6 @@ elif string.find (sys.platform, 'irix') != -1: gettext_lib = [] gettext_libpath = [] gettext_include = [] - i18n_defines = ['INTERNATIONAL', 'FTGL_STATIC_LIBRARY', 'WITH_FREETYPE2'] elif string.find (sys.platform, 'hp-ux') != -1: window_system = 'X11' @@ -516,7 +511,6 @@ else: config.write ("ODE_LIBRARY = %s\n"%(ode_lib)) config.write ("\n# The following information is only necessary when building with\n") config.write ("# internationalization support.\n"); - config.write ("I18N_DEFINES = %s\n"%(i18n_defines)) config.write ("FTGL_INCLUDE = %s\n"%(ftgl_include)) config.write ("FTGL_LIBPATH = %s\n"%(ftgl_libpath)) config.write ("FTGL_LIBRARY = %s\n"%(ftgl_lib)) @@ -587,7 +581,6 @@ user_options.AddOptions ( ('ODE_INCLUDE', 'Include directory for ODE header files.'), ('ODE_LIBPATH', 'Library path where the ODE library is located.'), ('ODE_LIBRARY', 'ODE library name.'), - ('I18N_DEFINES', 'Preprocessor defines needed for internationalization support.'), ('FTGL_INCLUDE', 'Include directory for ftgl header files.'), ('FTGL_LIBPATH', 'Library path where the ftgl library is located.'), ('FTGL_LIBRARY', 'ftgl library name.'), @@ -622,9 +615,6 @@ else: #defines += ['_DEBUG'] specifying this makes msvc want to link to python22_d.lib?? platform_linkflags += ['/DEBUG','/PDB:blender.pdb'] -if user_options_dict['USE_INTERNATIONAL']: - defines += user_options_dict['I18N_DEFINES'] - #----------------------------------------------------------------------------- # Settings to be exported to other SConscript files #----------------------------------------------------------------------------- diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 7f151f68e26..479980673d2 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -58,4 +58,7 @@ blenkernel_env.Append (CPPPATH = ['.', '#/intern/iksolver/extern', '../blenloader']) +if user_options_dict['USE_INTERNATIONAL'] == 1: + blenkernel_env.Append (CPPDEFINES = 'WITH_FREETYPE2') + blenkernel_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blenkernel', source=source_files) diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript index 9b091fc7c7f..bc36cd234e6 100644 --- a/source/blender/blenlib/SConscript +++ b/source/blender/blenlib/SConscript @@ -38,6 +38,9 @@ blenlib_env.Append (CPPPATH = ['.', '#/intern/guardedalloc', '../include']) +if user_options_dict['USE_INTERNATIONAL'] == 1: + blenlib_env.Append (CPPDEFINES = 'WITH_FREETYPE2') + blenlib_env.Append (CPPPATH = extra_includes) blenlib_env.Prepend (CPPPATH = user_options_dict['FREETYPE_INCLUDE']) blenlib_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_blenlib', source=source_files) diff --git a/source/blender/ftfont/SConscript b/source/blender/ftfont/SConscript index 3cde8d6346b..8cfe4223f1b 100644 --- a/source/blender/ftfont/SConscript +++ b/source/blender/ftfont/SConscript @@ -22,4 +22,5 @@ ftf_env.Prepend (CPPPATH = user_options_dict['GETTEXT_INCLUDE']) ftf_env.Append(CCFLAGS = cflags) ftf_env.Append(CXXFLAGS = cxxflags) ftf_env.Append(CPPDEFINES = defines) +ftf_env.Append(CPPDEFINES = 'FTGL_STATIC_LIBRARY') ftf_env.Library (target='#'+user_options_dict['BUILD_DIR']+'/lib/blender_FTF', source=source_files) diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript index 68ed7ef0077..91c75559f2c 100644 --- a/source/blender/src/SConscript +++ b/source/blender/src/SConscript @@ -140,6 +140,8 @@ src_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE']) if user_options_dict['USE_INTERNATIONAL'] == 1: src_env.Append (CPPPATH=['../ftfont']) + src_env.Append (CPPDEFINES = 'INTERNATIONAL') + src_env.Append (CPPDEFINES = 'FTGL_STATIC_LIBRARY') src_env.Append (CPPPATH=extra_includes)