diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-15 14:03:17 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-15 14:03:17 +0400 |
commit | b93da9b01e163158a830872d29f8bd874f63d54d (patch) | |
tree | 59730d1145eba4638a5128d0cc2c5fe3215007ab /build_files/scons/tools | |
parent | 8add19d3ece8526f5334acec90fd4c1f1155218c (diff) |
Color Management, Stage 1: Initial OpenColorIO library integration
This commit integrates support of OpenColorIO library into build systems.
It also contains C-API for OpenColorIO library which could be used by Blender.
CMake has got find rules familiar to OpenImageIO's one which makes it easier
for build system to find needed libraries and includes. Scons only could use
explicitly defined paths to libraries and includes.
C-API would be compiled and Blender would be linked against C-API and OpenColorIO
but it wouldn't affect on Blender behavior at all.
OpenColorIO could be disabled by setting up WITH_OCIO to Off in CMake and
setting WITH_BF_OCIO in Scons.
Diffstat (limited to 'build_files/scons/tools')
-rw-r--r-- | build_files/scons/tools/Blender.py | 12 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 4ab020dc26a..1e114a43ae0 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -204,6 +204,11 @@ def setup_staticlibs(lenv): if lenv['WITH_BF_STATICOIIO']: statlibs += Split(lenv['BF_OIIO_LIB_STATIC']) + if lenv['WITH_BF_OCIO']: + libincs += Split(lenv['BF_OCIO_LIBPATH']) + if lenv['WITH_BF_STATICOCIO']: + statlibs += Split(lenv['BF_OCIO_LIB_STATIC']) + if lenv['WITH_BF_BOOST']: libincs += Split(lenv['BF_BOOST_LIBPATH']) if lenv['WITH_BF_STATICBOOST']: @@ -252,6 +257,10 @@ def setup_syslibs(lenv): if not lenv['WITH_BF_STATICOIIO']: syslibs += Split(lenv['BF_OIIO_LIB']) + if lenv['WITH_BF_OCIO']: + if not lenv['WITH_BF_STATICOCIO']: + syslibs += Split(lenv['BF_OCIO_LIB']) + if lenv['WITH_BF_OPENEXR'] and not lenv['WITH_BF_STATICOPENEXR']: syslibs += Split(lenv['BF_OPENEXR_LIB']) if lenv['WITH_BF_TIFF'] and not lenv['WITH_BF_STATICTIFF']: @@ -584,6 +593,9 @@ def AppIt(target=None, source=None, env=None): commands.getoutput(cmd) cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION) commands.getoutput(cmd) + if env['WITH_BF_OCIO']: + cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION) + commands.getoutput(cmd) cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) commands.getoutput(cmd) diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 2fa503f3f26..633492ba0ee 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -163,6 +163,7 @@ def validate_arguments(args, bc): 'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC', '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_LIBMV' ] @@ -575,6 +576,14 @@ def read_opts(env, cfg, args): ('BF_OIIO_LIBPATH', 'OIIO library path', ''), ('BF_OIIO_LIB_STATIC', 'OIIO static library', ''), + (BoolVariable('WITH_BF_OCIO', 'Build with OpenColorIO', False)), + (BoolVariable('WITH_BF_STATICOCIO', 'Staticly link to OpenColorIO', False)), + ('BF_OCIO', 'OCIO root path', ''), + ('BF_OCIO_INC', 'OCIO include path', ''), + ('BF_OCIO_LIB', 'OCIO library', ''), + ('BF_OCIO_LIBPATH', 'OCIO library path', ''), + ('BF_OCIO_LIB_STATIC', 'OCIO static library', ''), + (BoolVariable('WITH_BF_BOOST', 'Build with Boost', False)), (BoolVariable('WITH_BF_STATICBOOST', 'Staticly link to boost', False)), ('BF_BOOST', 'Boost root path', ''), |