Scons compiling fix
authorJoshua Leung <aligorith@gmail.com>
Mon, 12 Nov 2012 02:30:16 +0000 (02:30 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 12 Nov 2012 02:30:16 +0000 (02:30 +0000)
Proper implementation for only including the boost locale libs when
WITH_BF_INTERNATIONAL is enabled, so that those of us who do not need/want to
bother with translated ui's can compile. The way it was done before was wrong as
1) the value was always set to true earlier in the config scripts, 2) the base
config scripts run before user config overrides are set

build_files/scons/config/darwin-config.py
build_files/scons/config/linux-config.py
build_files/scons/config/win32-mingw-config.py
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-mingw-config.py
build_files/scons/config/win64-vc-config.py
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py

index ea7d60a62eb70045f6762cce0185ccdcc800d2f8..b89f3f92cfef5b17ae84c09b971384b80c8e9d4d 100644 (file)
@@ -292,8 +292,7 @@ WITH_BF_BOOST = True
 BF_BOOST = LIBDIR + '/boost'
 BF_BOOST_INC = BF_BOOST + '/include'
 BF_BOOST_LIB = 'boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt'
-if WITH_BF_INTERNATIONAL:
-    BF_BOOST_LIB += ' boost_locale-mt'
+BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mt'
 BF_BOOST_LIBPATH = BF_BOOST + '/lib'
 
 WITH_BF_CYCLES_CUDA_BINARIES = False
index 9bab4bc1dade07f2383a4a8b659bd17c5191defc..9ffe67e6b484d579e5ecc04cd23011ca383f2dd6 100644 (file)
@@ -226,8 +226,7 @@ if not os.path.exists(LCGDIR + '/boost'):
     BF_BOOST = '/usr'
 BF_BOOST_INC = BF_BOOST + '/include'
 BF_BOOST_LIB = 'boost_date_time boost_filesystem boost_regex boost_system boost_thread'
-if WITH_BF_INTERNATIONAL:
-    BF_BOOST_LIB += ' boost_locale'
+BF_BOOST_LIB_INTERNATIONAL = 'boost_locale'
 BF_BOOST_LIBPATH = BF_BOOST + '/lib'
 
 WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
index 768722fac328db409c98f1caa72a61ac74c55129..77641f8c8426d6a9c93a0af497519d6488ceb577 100644 (file)
@@ -164,8 +164,7 @@ WITH_BF_BOOST = True
 BF_BOOST = LIBDIR + '/boost'
 BF_BOOST_INC = BF_BOOST + '/include'
 BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_49 boost_filesystem-mgw46-mt-s-1_49 boost_regex-mgw46-mt-s-1_49 boost_system-mgw46-mt-s-1_49 boost_thread-mgw46-mt-s-1_49'
-if WITH_BF_INTERNATIONAL:
-    BF_BOOST_LIB += ' boost_locale-mgw46-mt-s-1_49'
+BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mgw46-mt-s-1_49'
 BF_BOOST_LIBPATH = BF_BOOST + '/lib'
 
 #Ray trace optimization
index c093fdb4a996452a59bc440a9f017e59eab88ad9..a2b76bbed888b6f9fcd580d0fc56e636921dd0d8 100644 (file)
@@ -166,8 +166,7 @@ WITH_BF_BOOST = True
 BF_BOOST = '${LIBDIR}/boost'
 BF_BOOST_INC = '${BF_BOOST}/include'
 BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49'
-if WITH_BF_INTERNATIONAL:
-    BF_BOOST_LIB += ' libboost_locale-vc90-mt-s-1_49'
+BF_BOOST_LIB_INTERNATIONAL = 'libboost_locale-vc90-mt-s-1_49'
 BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
 
 #CUDA
index bca3df162898cfefa9e89d5420a1d6c2af1046cc..0840c6fd7e30dce792cef8e2a967d4976c800d89 100644 (file)
@@ -164,8 +164,7 @@ WITH_BF_BOOST = True
 BF_BOOST = LIBDIR + '/boost'
 BF_BOOST_INC = BF_BOOST + '/include'
 BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49 boost_filesystem-mgw47-mt-s-1_49 boost_filesystem-mgw47-mt-sd-1_49 boost_regex-mgw47-mt-s-1_49 boost_regex-mgw47-mt-sd-1_49 boost_system-mgw47-mt-s-1_49 boost_system-mgw47-mt-sd-1_49 boost_thread-mgw47-mt-s-1_49 boost_thread-mgw47-mt-sd-1_49'
-if WITH_BF_INTERNATIONAL:
-    BF_BOOST_LIB += ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
+BF_BOOST_LIB_INTERNATIONAL = ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
 BF_BOOST_LIBPATH = BF_BOOST + '/lib'
 
 #Ray trace optimization
index 9d3f42f7c7bc64c250a7a969e5541b1caedc05ed..a0c37f0b73f605c95da8087327a3fb4a965e12a3 100644 (file)
@@ -164,8 +164,7 @@ WITH_BF_BOOST = True
 BF_BOOST = '${LIBDIR}/boost'
 BF_BOOST_INC = '${BF_BOOST}/include'
 BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49'
-if WITH_BF_INTERNATIONAL:
-    BF_BOOST_LIB += ' libboost_locale-vc90-mt-s-1_49'
+BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc90-mt-s-1_49'
 BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
 
 #CUDA
index 7d7a32682cba0fafe1da0801f514a7d843127f20..7b8932bbb4ca2bf8e7ffb1541015379fa94b1add 100644 (file)
@@ -310,6 +310,9 @@ def setup_syslibs(lenv):
                 
     if lenv['WITH_BF_BOOST'] and not lenv['WITH_BF_STATICBOOST']:
         syslibs += Split(lenv['BF_BOOST_LIB'])
+        
+        if lenv['WITH_BF_INTERNATIONAL']:
+            syslibs += Split(lenv['BF_BOOST_LIB_INTERNATIONAL'])
 
     if not lenv['WITH_BF_STATICJPEG']:
         syslibs += Split(lenv['BF_JPEG_LIB'])
index 90d3f578d98a611e9277e842d71bd1c8e521a4da..2296a9b884a7e5bd4844f3ab597f5d5fec17cc8b 100644 (file)
@@ -163,7 +163,7 @@ def validate_arguments(args, bc):
             'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE',
             'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
             'WITH_BF_OCIO', 'WITH_BF_STATICOCIO', 'BF_OCIO', 'BF_OCIO_INC', 'BF_OCIO_LIB', 'BF_OCIO_LIB_STATIC', 'BF_OCIO_LIBPATH',
-            'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
+            'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_INTERNATIONAL', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
             'WITH_BF_LIBMV'
             ]