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.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user