Scons:
authorThomas Dinges <blender@dingto.org>
Thu, 3 Nov 2011 12:40:15 +0000 (12:40 +0000)
committerThomas Dinges <blender@dingto.org>
Thu, 3 Nov 2011 12:40:15 +0000 (12:40 +0000)
* Basic support for OpenImageIO and Boost libraries
* Path to libraries added for win32/64-vc-config.py, still commented out.

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

index ec37b3046c8345b8444e1ccde7467eb01ede9302..1e4821180d619cce355691316af23c77503b36dc 100644 (file)
@@ -149,6 +149,20 @@ WITH_BF_3DMOUSE = True
 
 WITH_BF_OPENMP = True
 
+'''
+WITH_BF_OIIO = True
+BF_OIIO = LIBDIR + '/openimageio'
+BF_OIIO_INC = '${BF_OIIO}/include'
+BF_OIIO_LIB = 'OpenImageIO'
+BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
+
+WITH_BF_BOOST = True
+BF_BOOST = LIBDIR + '/boost'
+BF_BOOST_INC = '${BF_BOOST}/include'
+BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_46_1 libboost_filesystem-vc90-mt-s-1_46_1 libboost_regex-vc90-mt-s-1_46_1 libboost_system-vc90-mt-s-1_46_1 libboost_thread-vc90-mt-s-1_46_1'
+BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
+'''
+
 #Ray trace optimization
 WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
index afa64e03e80dd05cf020fb455116e9dc9a062464..0920d9375ae33c5a43795dbff8caf2d7f58065aa 100644 (file)
@@ -153,6 +153,20 @@ WITH_BF_3DMOUSE = True
 
 WITH_BF_OPENMP = True
 
+'''
+WITH_BF_OIIO = True
+BF_OIIO = LIBDIR + '/openimageio'
+BF_OIIO_INC = '${BF_OIIO}/include'
+BF_OIIO_LIB = 'OpenImageIO'
+BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
+
+WITH_BF_BOOST = True
+BF_BOOST = LIBDIR + '/boost'
+BF_BOOST_INC = '${BF_BOOST}/include'
+BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_45 libboost_filesystem-vc90-mt-s-1_45 libboost_regex-vc90-mt-s-1_45 libboost_system-vc90-mt-s-1_45 libboost_thread-vc90-mt-s-1_45'
+BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
+'''
+
 #Ray trace optimization
 WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE','/arch:SSE2']
index 875d8f7388b06a03baa6ca1f023f61ba4d9708de..44f9a4c8062a6b60bcb100e88e66fc6be54d5e89 100644 (file)
@@ -192,6 +192,11 @@ def setup_staticlibs(lenv):
     if lenv['WITH_BF_OPENMP']:
         if lenv['OURPLATFORM'] == 'linuxcross':
             libincs += Split(lenv['BF_OPENMP_LIBPATH'])
+            
+    if lenv['WITH_BF_OIIO']:
+        libincs += Split(lenv['BF_OIIO_LIBPATH'])
+    if lenv['WITH_BF_BOOST']:
+        libincs += Split(lenv['BF_BOOST_LIBPATH'])
 
     # setting this last so any overriding of manually libs could be handled
     if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
@@ -275,6 +280,11 @@ def setup_syslibs(lenv):
             if not lenv['WITH_BF_STATIC3DMOUSE']:
                 syslibs += Split(lenv['BF_3DMOUSE_LIB'])
 
+    if lenv['WITH_BF_OIIO']:
+        syslibs += Split(lenv['BF_OIIO_LIB'])
+    if lenv['WITH_BF_BOOST']:
+        syslibs += Split(lenv['BF_BOOST_LIB'])
+
     syslibs += lenv['LLIBS']
 
     return syslibs
index b457a05319d539b9c528b9650add814167c7cb3b..68054fe485e3d6326408c6ddb8152a946c162aab 100644 (file)
@@ -155,7 +155,9 @@ def validate_arguments(args, bc):
             'WITH_BF_CXX_GUARDEDALLOC',
             'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
             'BUILDBOT_BRANCH',
-            'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC'
+            'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
+            'WITH_BF_OIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIBPATH',
+            'WITH_BF_BOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIBPATH'
             ]
     
     # Have options here that scons expects to be lists
@@ -532,6 +534,16 @@ def read_opts(env, cfg, args):
         (BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False)),
 
         ('BUILDBOT_BRANCH', 'Buildbot branch name', ''),
+        
+        (BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)),
+        ('BF_OIIO_INC', 'OIIO include path', ''),
+        ('BF_OIIO_LIB', 'OIIO library', ''),
+        ('BF_OIIO_LIBPATH', 'OIIO library path', ''),
+        
+        (BoolVariable('WITH_BF_BOOST', 'Build with Boost', False)),
+        ('BF_BOOST_INC', 'Boost include path', ''),
+        ('BF_BOOST_LIB', 'Boost library', ''),
+        ('BF_BOOST_LIBPATH', 'Boost library path', '')
     ) # end of opts.AddOptions()
 
     return localopts