[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48508] branches/soc-2011-tomato: Tomato: enable color management by default for Windows

Sergey Sharybin sergey.vfx at gmail.com
Mon Jul 2 22:38:59 CEST 2012


Revision: 48508
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48508
Author:   nazgul
Date:     2012-07-02 20:38:57 +0000 (Mon, 02 Jul 2012)
Log Message:
-----------
Tomato: enable color management by default for Windows

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.

Modified Paths:
--------------
    branches/soc-2011-tomato/CMakeLists.txt
    branches/soc-2011-tomato/build_files/scons/config/win32-vc-config.py
    branches/soc-2011-tomato/build_files/scons/config/win64-vc-config.py
    branches/soc-2011-tomato/intern/opencolorio/CMakeLists.txt
    branches/soc-2011-tomato/intern/opencolorio/SConscript
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c
    branches/soc-2011-tomato/source/creator/CMakeLists.txt

Modified: branches/soc-2011-tomato/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/CMakeLists.txt	2012-07-02 20:35:08 UTC (rev 48507)
+++ branches/soc-2011-tomato/CMakeLists.txt	2012-07-02 20:38:57 UTC (rev 48508)
@@ -366,7 +366,7 @@
 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()
 

Modified: branches/soc-2011-tomato/build_files/scons/config/win32-vc-config.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/config/win32-vc-config.py	2012-07-02 20:35:08 UTC (rev 48507)
+++ branches/soc-2011-tomato/build_files/scons/config/win32-vc-config.py	2012-07-02 20:38:57 UTC (rev 48508)
@@ -156,7 +156,7 @@
 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'

Modified: branches/soc-2011-tomato/build_files/scons/config/win64-vc-config.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/config/win64-vc-config.py	2012-07-02 20:35:08 UTC (rev 48507)
+++ branches/soc-2011-tomato/build_files/scons/config/win64-vc-config.py	2012-07-02 20:38:57 UTC (rev 48508)
@@ -153,7 +153,7 @@
 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'

Modified: branches/soc-2011-tomato/intern/opencolorio/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/intern/opencolorio/CMakeLists.txt	2012-07-02 20:35:08 UTC (rev 48507)
+++ branches/soc-2011-tomato/intern/opencolorio/CMakeLists.txt	2012-07-02 20:38:57 UTC (rev 48508)
@@ -40,4 +40,10 @@
 add_definitions(
 )
 
+if(WIN32 AND NOT MINGW)
+	list(APPEND INC
+		${BOOST_INCLUDE_DIR}
+	)
+endif()
+
 blender_add_lib(bf_intern_opencolorio "${SRC}" "${INC}" "${INC_SYS}")

Modified: branches/soc-2011-tomato/intern/opencolorio/SConscript
===================================================================
--- branches/soc-2011-tomato/intern/opencolorio/SConscript	2012-07-02 20:35:08 UTC (rev 48507)
+++ branches/soc-2011-tomato/intern/opencolorio/SConscript	2012-07-02 20:38:57 UTC (rev 48508)
@@ -7,4 +7,7 @@
 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])

Modified: branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c
===================================================================
--- branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c	2012-07-02 20:35:08 UTC (rev 48507)
+++ branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c	2012-07-02 20:38:57 UTC (rev 48508)
@@ -649,7 +649,7 @@
 				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);

Modified: branches/soc-2011-tomato/source/creator/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/source/creator/CMakeLists.txt	2012-07-02 20:35:08 UTC (rev 48507)
+++ branches/soc-2011-tomato/source/creator/CMakeLists.txt	2012-07-02 20:38:57 UTC (rev 48508)
@@ -301,6 +301,15 @@
 	)
 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 @@
 		)
 	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




More information about the Bf-blender-cvs mailing list