Tomato: enable color management by default for Windows
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 2 Jul 2012 20:38:57 +0000 (20:38 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 2 Jul 2012 20:38:57 +0000 (20:38 +0000)
This commit enables color management stuff when building on
Windows using MSVC 2008 compiler. This required some fixes
to both CMake and SCons configurations which were tested for
64bit target. Tests of 32bit target would be welcome.

Also solved compilation error caused by recently added anim
player. Not sure how to test this, but it shall  at least
compile on Windows now.

Didn't test MinGW compilation at all yet, could still be buggy.

CMakeLists.txt
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-vc-config.py
intern/opencolorio/CMakeLists.txt
intern/opencolorio/SConscript
source/blender/windowmanager/intern/wm_playanim.c
source/creator/CMakeLists.txt

index 707011728f8d1ec7edeb9e43514a6bdbd57ee61c..094bec5df9e3c2cc7a1243e3b290a3c75199630b 100644 (file)
@@ -366,7 +366,7 @@ if(WITH_CYCLES)
 endif()
 
 # auto enable boost for cycles and carve
-if(WITH_CYCLES OR WITH_CARVE)
+if(WITH_CYCLES OR WITH_CARVE OR WITH_OPENCOLORIO)
        set(WITH_BOOST ON)
 endif()
 
index 00d77ec3246ad309c4622ba03d656f2808448195..1e1084a9d40d4170592740e775dfa34567d18dd7 100644 (file)
@@ -156,7 +156,7 @@ BF_OIIO_INC = '${BF_OIIO}/include'
 BF_OIIO_LIB = 'OpenImageIO'
 BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
 
-WITH_BF_OCIO = False
+WITH_BF_OCIO = True
 BF_OCIO = '${LIBDIR}/opencolorio'
 BF_OCIO_INC = '${BF_OCIO}/include'
 BF_OCIO_LIB = 'OpenColorIO'
index bdeca1db0f9248c19e66ea0ee499d123acb43ceb..64c741e4bdf22f6b6c45ad4f12f718e69f330b29 100644 (file)
@@ -153,7 +153,7 @@ BF_OIIO_LIB = 'OpenImageIO'
 BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
 BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
 
-WITH_BF_OCIO = False
+WITH_BF_OCIO = True
 BF_OCIO = '${LIBDIR}/opencolorio'
 BF_OCIO_INC = '${BF_OCIO}/include'
 BF_OCIO_LIB = 'OpenColorIO'
index 8fd383df61fd5e6d03da5f8082899bd1b788a95b..3ad2e91287b0e31ca5800834777b9b4294ffe3fd 100644 (file)
@@ -40,4 +40,10 @@ set(SRC
 add_definitions(
 )
 
+if(WIN32 AND NOT MINGW)
+       list(APPEND INC
+               ${BOOST_INCLUDE_DIR}
+       )
+endif()
+
 blender_add_lib(bf_intern_opencolorio "${SRC}" "${INC}" "${INC_SYS}")
index b92a7848579f79331dfaa067b64aad9df4b242e8..ef814ed1509bdd4b34050f8c780ae58a15dc43db 100644 (file)
@@ -7,4 +7,7 @@ sources = env.Glob('*.cpp')
 incs = '.'
 incs += ' ' + env['BF_OCIO_INC']
 
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+    incs += ' ' + env['BF_BOOST_INC']
+
 env.BlenderLib( 'bf_intern_opencolorio', sources, Split(incs), [], libtype=['extern','player'], priority=[10, 185])
index 39f1f6702df54d0207e8a031d5ad11f2d71690ac..83dd8c528a3fb84cc5ec05d8c4b41d2d395c40f7 100644 (file)
@@ -649,7 +649,7 @@ void playanim(int argc, const char **argv)
                                BLI_strncpy(ibuf->name, picture->name, sizeof(ibuf->name));
 
 #ifdef _WIN32
-                               window_set_title(g_window, picture->name);
+                               GHOST_SetTitle(g_window, picture->name);
 #endif
 
                                while (pupdate_time()) PIL_sleep_ms(1);
index 14305721f859d4f4fe08c264e4da2ff6a07bee93..a5d531760ff3f82bf82c171dc4a0f755fa39828c 100644 (file)
@@ -301,6 +301,15 @@ if(WITH_INTERNATIONAL)
        )
 endif()
 
+# color management
+if(WITH_OPENCOLORIO)
+       install(
+               DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/colormanagement
+               DESTINATION ${TARGETDIR_VER}/datafiles
+               PATTERN ".svn" EXCLUDE
+       )
+endif()
+
 # helpful tip when using make
 if("${CMAKE_GENERATOR}" MATCHES ".*Makefiles.*")
        # message after building.
@@ -395,13 +404,6 @@ if(UNIX AND NOT APPLE)
                )
        endif()
 
-       if(WITH_OPENCOLORIO)
-               install(
-                       DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/colormanagement
-                       DESTINATION ${TARGETDIR_VER}/datafiles
-               )
-       endif()
-
        if(WITH_PYTHON)
                if(WITH_PYTHON_INSTALL)
                        # on some platforms (like openSUSE) Python is linked