build_environment: osl 1.9.9
authorRay Molenkamp <github@lazydodo.com>
Thu, 16 Aug 2018 23:41:35 +0000 (17:41 -0600)
committerRay Molenkamp <github@lazydodo.com>
Thu, 16 Aug 2018 23:42:37 +0000 (17:42 -0600)
does no longer seem to bundle pugixml, so that's a new dependency.

build_files/build_environment/CMakeLists.txt
build_files/build_environment/cmake/openexr.cmake
build_files/build_environment/cmake/osl.cmake
build_files/build_environment/cmake/pugixml.cmake [new file with mode: 0644]
build_files/build_environment/cmake/versions.cmake
build_files/build_environment/patches/osl.diff

index e9a4b69cd46e91a579cba69532db46a80093512d..15ac68ef0b026be7a7b949d9d46b79f9020d1127 100644 (file)
@@ -91,6 +91,7 @@ include(cmake/openvdb.cmake)
 include(cmake/python.cmake)
 include(cmake/python_site_packages.cmake)
 include(cmake/numpy.cmake)
+include(cmake/pugixml.cmake)
 
 if(WITH_WEBP)
        include(cmake/webp.cmake)
index 2aa167a4be5c8eac3026c73b95f9ebef5054b0bd..f9e414a27314fd67a0f138cab648a0accfd61f10 100644 (file)
@@ -31,6 +31,16 @@ if(WIN32)
                -DOPENEXR_BUILD_TESTS=Off
                -DOPENEXR_BUILD_VIEWERS=Off
                -DOPENEXR_BUILD_UTILS=Off
+               #yaml-cpp > 0.5.0 requires boost.
+               -DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
+               -DBoost_USE_MULTITHREADED=ON
+               -DUSE_STATIC_BOOST=On
+               -DBoost_USE_STATIC_LIBS=ON
+               -DBoost_USE_STATIC_RUNTIME=ON
+               -DBoost_DEBUG=ON
+               -DBOOST_ROOT=${LIBDIR}/boost
+               -DBoost_NO_SYSTEM_PATHS=ON
+               -DOCIO_USE_BOOST_PTR=On
        )
        ExternalProject_Add(external_openexr
                URL ${OPENEXR_URI}
@@ -43,6 +53,8 @@ if(WIN32)
        
        ExternalProject_Add_Step(external_openexr after_install
                COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/openexr/lib
+               #libs have moved between versions, just duplicate it for now. 
+               COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/lib ${HARVEST_TARGET}/ilmbase/lib
                COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openexr/include ${HARVEST_TARGET}/openexr/include 
                DEPENDEES install
        )
index f75d8b4d5388699dd6a5b8fef1e68ea1ee6e6429..cf7d2e40c4b4df4e88bbebd497f0d3343d2088b9 100644 (file)
@@ -31,7 +31,7 @@ else()
        set(OSL_OPENIMAGEIO_LIBRARY "${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO${LIBEXT};${LIBDIR}/openimageio/lib/${LIBPREFIX}OpenImageIO_Util${LIBEXT};${LIBDIR}/png/lib/${LIBPREFIX}png16${LIBEXT};${LIBDIR}/jpg/lib/${LIBPREFIX}jpeg${LIBEXT};${LIBDIR}/tiff/lib/${LIBPREFIX}tiff${LIBEXT};${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}")
 endif()
 
-set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Half.lib^^${LIBDIR}/ilmbase/lib/IlmThread${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Iex${ILMBASE_VERSION_POSTFIX}.lib")
+set(OSL_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/ilmbase/lib/Imath${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Half{ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/IlmThread${ILMBASE_VERSION_POSTFIX}.lib^^${LIBDIR}/ilmbase/lib/Iex${ILMBASE_VERSION_POSTFIX}.lib")
 set(OSL_LLVM_LIBRARY "${LIBDIR}/llvm/lib/LLVMAnalysis${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMAsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitReader${LIBEXT};${LIBDIR}/llvm/lib/LLVMBitWriter${LIBEXT};${LIBDIR}/llvm/lib/LLVMCodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMCore${LIBEXT};${LIBDIR}/llvm/lib/LLVMDebugInfo${LIBEXT};${LIBDIR}/llvm/lib/LLVMExecutionEngine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstCombine${LIBEXT};${LIBDIR}/llvm/lib/LLVMInstrumentation${LIBEXT};${LIBDIR}/llvm/lib/LLVMInterpreter${LIBEXT};${LIBDIR}/llvm/lib/LLVMJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMLinker${LIBEXT};${LIBDIR}/llvm/lib/LLVMMC${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCDisassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCJIT${LIBEXT};${LIBDIR}/llvm/lib/LLVMMCParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMObject${LIBEXT};${LIBDIR}/llvm/lib/LLVMRuntimeDyld${LIBEXT};${LIBDIR}/llvm/lib/LLVMScalarOpts${LIBEXT};${LIBDIR}/llvm/lib/LLVMSelectionDAG${LIBEXT};${LIBDIR}/llvm/lib/LLVMSupport${LIBEXT};${LIBDIR}/llvm/lib/LLVMTableGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMTarget${LIBEXT};${LIBDIR}/llvm/lib/LLVMTransformUtils${LIBEXT};${LIBDIR}/llvm/lib/LLVMVectorize${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmParser${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86AsmPrinter${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86CodeGen${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Desc${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Disassembler${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Info${LIBEXT};${LIBDIR}/llvm/lib/LLVMX86Utils${LIBEXT};${LIBDIR}/llvm/lib/LLVMipa${LIBEXT};${LIBDIR}/llvm/lib/LLVMipo${LIBEXT}")
 
 set(OSL_EXTRA_ARGS
@@ -50,6 +50,7 @@ set(OSL_EXTRA_ARGS
        -DOPENEXR_HOME=${LIBDIR}/openexr/
        -DILMBASE_HOME=${LIBDIR}/ilmbase/
        -DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
+       -DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
        -DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
        -DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
        -DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
@@ -69,7 +70,10 @@ set(OSL_EXTRA_ARGS
        -DSTOP_ON_WARNING=OFF
        -DOSL_BUILD_CPP11=ON
        -DUSE_LLVM_BITCODE=OFF
+       -DUSE_PARTIO=OFF
        ${OSL_SIMD_FLAGS}
+       -DPUGIXML_HOME=${LIBDIR}/pugixml
+       -DPARTIO_LIBRARIES=
 )
 
 ExternalProject_Add(external_osl
@@ -78,9 +82,8 @@ ExternalProject_Add(external_osl
        LIST_SEPARATOR ^^
        URL_HASH MD5=${OSL_HASH}
        PREFIX ${BUILD_DIR}/osl
-       PATCH_COMMAND
-               ${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff &&
-               ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff
+       PATCH_COMMAND ${PATCH_CMD} -p 3 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl.diff 
+       #       ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/osl/src/external_osl < ${PATCH_DIR}/osl_simd_oiio.diff
        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/osl -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${DEFAULT_CMAKE_FLAGS} ${OSL_EXTRA_ARGS}
        INSTALL_DIR ${LIBDIR}/osl
 )
@@ -95,4 +98,5 @@ add_dependencies(
        external_zlib
        external_flexbison
        external_openimageio
+       external_pugixml
 )
diff --git a/build_files/build_environment/cmake/pugixml.cmake b/build_files/build_environment/cmake/pugixml.cmake
new file mode 100644 (file)
index 0000000..bb1cb98
--- /dev/null
@@ -0,0 +1,36 @@
+# ***** 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(PUGIXML_EXTRA_ARGS
+)
+
+ExternalProject_Add(external_pugixml
+       URL ${PUGIXML_URI}
+       DOWNLOAD_DIR ${DOWNLOAD_DIR}
+       URL_HASH MD5=${PUGIXML_HASH}
+       PREFIX ${BUILD_DIR}/pugixml
+       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/pugixml ${DEFAULT_CMAKE_FLAGS} ${PUGIXML_EXTRA_ARGS}
+       INSTALL_DIR ${LIBDIR}/pugixml
+)
+
+#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()
index 2a465034d32ba047aa416092bcb1e5d7b5456ee4..18217f6c446a5405f7da87fc44bface3d341731c 100644 (file)
@@ -134,13 +134,9 @@ set(TIFF_VERSION 4.0.9)
 set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
 set(TIFF_HASH 54bad211279cc93eb4fca31ba9bfdc79)
 
-set(FLEXBISON_VERSION 2.5.5)
-set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
-set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
-
-set(OSL_VERSION 1.7.5)
-set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.zip)
-set(OSL_HASH 6924dd5d453159e7b6eb106a08c358cf)
+set(OSL_VERSION 1.9.9)
+set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
+set(OSL_HASH 44ad511e424965a10fce051a053b0605)
 
 set(PYTHON_VERSION 3.7.0)
 set(PYTHON_SHORT_VERSION 3.7)
@@ -266,5 +262,9 @@ 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)
 
+set(PUGIXML_VERSION 1.9)
+set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v1.9.tar.gz)
+set(PUGIXML_HASH 9346ca1dce2c48f1748c12fdac41a714)
+
 
 
index ccf34d99699205736e2752aceb45176c47efaf21..fcb5ec4165fd40085e4035fb3a935a121e7f8b73 100644 (file)
@@ -10,29 +10,3 @@ diff -Naur osl/src/external_osl/src/cmake/flexbison.cmake osl_bak/src/external_o
            MAIN_DEPENDENCY ${flexsrc}
            DEPENDS ${${compiler_headers}}
            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
---- osl/src/external_osl/src/include/OSL/oslconfig.h   2016-10-31 16:48:19 -0600
-+++ osl/src/external_osl/src/include/OSL/oslconfig.h   2018-05-27 11:18:08 -0600
-@@ -44,12 +44,18 @@
- // same if another packages is compiling against OSL and using these headers
- // (OSL may be C++11 but the client package may be older, or vice versa --
- // use these two symbols to differentiate these cases, when important).
--#if (__cplusplus >= 201402L)
--#  define OSL_CPLUSPLUS_VERSION  14
--#elif (__cplusplus >= 201103L)
--#  define OSL_CPLUSPLUS_VERSION  11
-+
-+// Force C++03 for MSVC in blender since svn the libraries are build with that
-+#if !defined(_MSC_VER)
-+      #if (__cplusplus >= 201402L)
-+      #  define OSL_CPLUSPLUS_VERSION  14
-+      #elif (__cplusplus >= 201103L)
-+      #  define OSL_CPLUSPLUS_VERSION  11
-+      #else
-+      #  define OSL_CPLUSPLUS_VERSION  3 /* presume C++03 */
-+      #endif
- #else
--#  define OSL_CPLUSPLUS_VERSION  3 /* presume C++03 */
-+      #  define OSL_CPLUSPLUS_VERSION  3 /* presume C++03 */
- #endif
- // Symbol export defines