[Bf-blender-cvs] [f634d4a8a62] master: build_environment: opencolorio 1.1.0

Ray Molenkamp noreply at git.blender.org
Wed Aug 15 20:32:45 CEST 2018


Commit: f634d4a8a62c78b8fec54ae3283b104a0e82b399
Author: Ray Molenkamp
Date:   Wed Aug 15 12:32:34 2018 -0600
Branches: master
https://developer.blender.org/rBf634d4a8a62c78b8fec54ae3283b104a0e82b399

build_environment: opencolorio 1.1.0

-Moved from dynamic link to static on windows
-gained lcms/tinyxml/yamlcpp deps, since we need a little more control over the build flags than the build-in options will provide.

===================================================================

M	build_files/build_environment/CMakeLists.txt
A	build_files/build_environment/cmake/lcms.cmake
M	build_files/build_environment/cmake/opencolorio.cmake
A	build_files/build_environment/cmake/tinyxml.cmake
M	build_files/build_environment/cmake/versions.cmake
A	build_files/build_environment/cmake/yamlcpp.cmake
A	build_files/build_environment/patches/cmakelists_lcms.txt
A	build_files/build_environment/patches/opencolorio_win.diff
A	build_files/build_environment/patches/tinyxml.diff

===================================================================

diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt
index 8376306caa1..e9a4b69cd46 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -96,7 +96,13 @@ if(WITH_WEBP)
 	include(cmake/webp.cmake)
 endif()
 if(WIN32)
+	#hmd_branch_deps
 	include(cmake/hidapi.cmake)
+	#ocio deps
+	include(cmake/tinyxml.cmake)
+	include(cmake/yamlcpp.cmake)
+	#lcms is an ocio dep, but only if you build the apps, leaving it here for convenience 
+	#include(cmake/lcms.cmake)
 endif()
 
 if(NOT WIN32 OR ENABLE_MINGW64)
diff --git a/build_files/build_environment/cmake/lcms.cmake b/build_files/build_environment/cmake/lcms.cmake
new file mode 100644
index 00000000000..943fab7e19c
--- /dev/null
+++ b/build_files/build_environment/cmake/lcms.cmake
@@ -0,0 +1,38 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(LCMS_EXTRA_ARGS
+)
+
+ExternalProject_Add(external_lcms
+	URL ${LCMS_URI}
+	DOWNLOAD_DIR ${DOWNLOAD_DIR}
+	URL_HASH MD5=${LCMS_HASH}
+	PREFIX ${BUILD_DIR}/lcms
+	#patch taken from ocio 
+	PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
+	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
+	INSTALL_DIR ${LIBDIR}/lcms
+)
+
+#if(BUILD_MODE STREQUAL Release AND WIN32)
+	#ExternalProject_Add_Step(external_freetype after_install
+	#	COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
+	#	DEPENDEES install
+	#)
+#endif()
diff --git a/build_files/build_environment/cmake/opencolorio.cmake b/build_files/build_environment/cmake/opencolorio.cmake
index d33c03eaa8d..f3d7c2b4c7b 100644
--- a/build_files/build_environment/cmake/opencolorio.cmake
+++ b/build_files/build_environment/cmake/opencolorio.cmake
@@ -22,7 +22,7 @@ set(OPENCOLORIO_EXTRA_ARGS
 	-DBoost_USE_STATIC_LIBS=ON
 	-DBoost_USE_STATIC_RUNTIME=ON
 	-DBOOST_ROOT=${LIBDIR}/boost
-	-DBOOST_INCLUDEDIR=${LIBDIR}/boost/include/boost_1_60/boost
+	-DBOOST_INCLUDEDIR=${LIBDIR}/boost/include/boost_1_68/boost
 	-DBoost_NO_SYSTEM_PATHS=ON
 	-DBoost_DEBUG=ON
 	-DBoost_MAJOR_VERSION=1
@@ -33,13 +33,38 @@ set(OPENCOLORIO_EXTRA_ARGS
 )
 
 if(WIN32)
+	set(OCIO_PATCH opencolorio_win.diff)
 	set(OPENCOLORIO_EXTRA_ARGS
 		${OPENCOLORIO_EXTRA_ARGS}
-		-DOCIO_USE_BOOST_PTR=ON
-		-DOCIO_BUILD_STATIC=OFF
-		-DOCIO_BUILD_SHARED=ON
+		-DOCIO_BUILD_SHARED=OFF
+		-DOCIO_BUILD_STATIC=ON
+		-DOCIO_BUILD_TRUELIGHT=OFF
+		-DOCIO_BUILD_APPS=OFF
+		-DOCIO_BUILD_NUKE=OFF
+		-DOCIO_BUILD_DOCS=OFF
+		-DOCIO_BUILD_TESTS=OFF
+		-DOCIO_BUILD_PYGLUE=OFF
+		-DOCIO_BUILD_JNIGLUE=OFF
+		-DOCIO_STATIC_JNIGLUE=OFF
+		-DOCIO_USE_SSE=ON
+		-DOCIO_INLINES_HIDDEN=OFF
+		-DOCIO_USE_BOOST_PTR=OFF
+		-DOCIO_PYGLUE_LINK=OFF
+		-DOCIO_PYGLUE_RESPECT_ABI=OFF
+		-DOCIO_PYGLUE_SONAME=OFF
+		-DOCIO_PYGLUE_LIB_PREFIX=OFF
+		-DUSE_EXTERNAL_TINYXML=ON
+		-DTINYXML_INCLUDE_DIR=${LIBDIR}/tinyxml/include
+		-DTINYXML_LIBRARY=${LIBDIR}/tinyxml/lib/tinyxml${libext}
+		-DUSE_EXTERNAL_YAML=ON
+		-DYAML_CPP_FOUND=ON
+		-DYAML_CPP_VERSION=${YAMLCPP_VERSION}
+		-DUSE_EXTERNAL_LCMS=ON
+		-DINC_1=${LIBDIR}/tinyxml/include
+		-DINC_2=${LIBDIR}/yamlcpp/include
 	)
 else()
+	set(OCIO_PATCH opencolorio.diff)
 	set(OPENCOLORIO_EXTRA_ARGS
 		${OPENCOLORIO_EXTRA_ARGS}
 		-DOCIO_USE_BOOST_PTR=OFF
@@ -53,7 +78,7 @@ ExternalProject_Add(external_opencolorio
 	DOWNLOAD_DIR ${DOWNLOAD_DIR}
 	URL_HASH MD5=${OPENCOLORIO_HASH}
 	PREFIX ${BUILD_DIR}/opencolorio
-	PATCH_COMMAND ${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/opencolorio.diff
+	PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencolorio/src/external_opencolorio < ${PATCH_DIR}/${OCIO_PATCH}
 	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencolorio ${DEFAULT_CMAKE_FLAGS} ${OPENCOLORIO_EXTRA_ARGS}
 	INSTALL_DIR ${LIBDIR}/opencolorio
 )
@@ -71,3 +96,22 @@ add_dependencies(
 	external_opencolorio
 	external_boost
 )
+
+if(WIN32)
+	add_dependencies(
+		external_opencolorio
+		external_tinyxml
+		external_yamlcpp
+	)
+	if(BUILD_MODE STREQUAL Release)
+		ExternalProject_Add_Step(external_opencolorio after_install
+			COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
+			COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
+			COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
+			COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
+			DEPENDEES install
+		)
+	endif()
+	
+endif()
+
diff --git a/build_files/build_environment/cmake/tinyxml.cmake b/build_files/build_environment/cmake/tinyxml.cmake
new file mode 100644
index 00000000000..2896bf5938a
--- /dev/null
+++ b/build_files/build_environment/cmake/tinyxml.cmake
@@ -0,0 +1,38 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(TINYXML_EXTRA_ARGS
+)
+
+ExternalProject_Add(external_tinyxml
+	URL ${TINYXML_URI}
+	DOWNLOAD_DIR ${DOWNLOAD_DIR}
+	URL_HASH MD5=${TINYXML_HASH}
+	PREFIX ${BUILD_DIR}/tinyxml
+	#patch taken from ocio 
+	PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
+	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
+	INSTALL_DIR ${LIBDIR}/tinyxml
+)
+
+#if(BUILD_MODE STREQUAL Release AND WIN32)
+	#ExternalProject_Add_Step(external_freetype after_install
+	#	COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
+	#	DEPENDEES install
+	#)
+#endif()
diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake
index c21f2ae3760..c5e8f6f6d96 100644
--- a/build_files/build_environment/cmake/versions.cmake
+++ b/build_files/build_environment/cmake/versions.cmake
@@ -105,8 +105,9 @@ set(OPENCOLLADA_VERSION v1.6.63)
 set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
 set(OPENCOLLADA_HASH e937c3897b86fc0da53cde97257f5156)
 
-set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/6de971097c7f552300f669ed69ca0b6cf5a70843.zip)
-set(OPENCOLORIO_HASH c9de0fd98f26ce6f2e08d617ca68b8e4)
+set(OPENCOLORIO_VERSION 1.1.0)
+set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
+set(OPENCOLORIO_HASH 802d8f5b1d1fe316ec5f76511aa611b8)
 
 set(LLVM_VERSION 6.0.1)
 set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
@@ -249,3 +250,19 @@ set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
 set(XML2_VERSION 2.9.4)
 set(XML2_URI ftp://xmlsoft.org/libxml2/libxml2-${XML2_VERSION}.tar.gz)
 set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
+
+set(TINYXML_VERSION 2_6_2)
+set(TINYXML_VERSION_DOTS 2.6.2)
+set(TINYXML_URI https://nchc.dl.sourceforge.net/project/tinyxml/tinyxml/${TINYXML_VERSION_DOTS}/tinyxml_${TINYXML_VERSION}.tar.gz)
+set(TINYXML_HASH c1b864c96804a10526540c664ade67f0)
+
+set(YAMLCPP_VERSION 0.6.2)
+set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
+set(YAMLCPP_HASH 5b943e9af0060d0811148b037449ef82)
+
+set(LCMS_VERSION 2.9)
+set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
+set(LCMS_HASH 8de1b7724f578d2995c8fdfa35c3ad0e)
+
+
+
diff --git a/build_files/build_environment/cmake/yamlcpp.cmake b/build_files/build_environment/cmake/yamlcpp.cmake
new file mode 100644
index 00000000000..308f7d88361
--- /dev/null
+++ b/build_files/build_environment/cmake/yamlcpp.cmake
@@ -0,0 +1,41 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(YAMLCPP_EXTRA_ARGS
+	-DBUILD_GMOCK=OFF
+	-DYAML_CPP_BUILD_TESTS=OFF
+	-DYAML_CPP_BUILD_TOOLS=OFF
+	-DYAML_CPP_BUILD_CONTRIB=OFF
+	-DMSVC_SHARED_RT=OFF
+)
+
+ExternalProjec

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list