diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-08-14 04:08:28 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-08-14 04:08:28 +0300 |
commit | fee32abee977c3d44c0ea7d098441d6261f51d3d (patch) | |
tree | d42c08444b7c6d6cb843a1cbce92c95833bf3c1a | |
parent | b993e8a17a077ae23b909a9da425e72e1b16bf1a (diff) |
build_environment: opensubdiv 3.3.3 with PR975 + TBB 2018_U5
-rw-r--r-- | build_files/build_environment/cmake/harvest.cmake | 10 | ||||
-rw-r--r-- | build_files/build_environment/cmake/opensubdiv.cmake | 29 | ||||
-rw-r--r-- | build_files/build_environment/cmake/tbb.cmake | 26 | ||||
-rw-r--r-- | build_files/build_environment/cmake/versions.cmake | 19 | ||||
-rw-r--r-- | build_files/build_environment/patches/opensubdiv.diff | 25 |
5 files changed, 55 insertions, 54 deletions
diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index b5b9eef7bb2..f346429dfbf 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -65,13 +65,8 @@ if(BUILD_MODE STREQUAL Release) ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/osl/ ${HARVEST_TARGET}/osl && # OpenVDB ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openVDB/ ${HARVEST_TARGET}/openVDB && - # tbb - ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/ && # opencollada ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencollada/ ${HARVEST_TARGET}/opencollada/ && - # opensubdiv - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv ${HARVEST_TARGET}/opensubdiv && # BlendThumb ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll && ${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll && @@ -104,11 +99,6 @@ if(BUILD_MODE STREQUAL Debug) ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslcomp.lib ${HARVEST_TARGET}/osl/lib/oslcomp_d.lib && ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslexec.lib ${HARVEST_TARGET}/osl/lib/oslexec_d.lib && ${CMAKE_COMMAND} -E copy ${LIBDIR}/osl/lib/oslquery.lib ${HARVEST_TARGET}/osl/lib/oslquery_d.lib && - # opensubdiv - ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib && - ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib && - # tbb - ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib && # openvdb ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib && # python diff --git a/build_files/build_environment/cmake/opensubdiv.cmake b/build_files/build_environment/cmake/opensubdiv.cmake index 930ef4e6ed3..1db3b11de9a 100644 --- a/build_files/build_environment/cmake/opensubdiv.cmake +++ b/build_files/build_environment/cmake/opensubdiv.cmake @@ -33,16 +33,11 @@ set(OPENSUBDIV_EXTRA_ARGS ) if(WIN32) - #no cuda support for vc15 yet - if(msvc15) - set(OPENSUBDIV_CUDA ON) - else() - set(OPENSUBDIV_CUDA ON) - endif() - set(OPENSUBDIV_EXTRA_ARGS ${OPENSUBDIV_EXTRA_ARGS} - -DNO_CUDA=${OPENSUBDIV_CUDA} + -DNO_CUDA=Off + -DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include + -DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib -DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL -DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT} -DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include @@ -69,10 +64,28 @@ ExternalProject_Add(external_opensubdiv INSTALL_DIR ${LIBDIR}/opensubdiv ) +if(WIN32) + if(BUILD_MODE STREQUAL Release) + ExternalProject_Add_Step(external_opensubdiv after_install + COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/lib ${HARVEST_TARGET}/opensubdiv/lib + COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opensubdiv/include ${HARVEST_TARGET}/opensubdiv/include + DEPENDEES install + ) + endif() + if(BUILD_MODE STREQUAL Debug) + ExternalProject_Add_Step(external_opensubdiv after_install + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdCPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opensubdiv/lib/osdGPU.lib ${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib + DEPENDEES install + ) + endif() +endif() + add_dependencies( external_opensubdiv external_glew external_glfw external_clew external_cuew + external_tbb ) diff --git a/build_files/build_environment/cmake/tbb.cmake b/build_files/build_environment/cmake/tbb.cmake index fa5c9029ed0..4e0357da8bb 100644 --- a/build_files/build_environment/cmake/tbb.cmake +++ b/build_files/build_environment/cmake/tbb.cmake @@ -23,14 +23,6 @@ set(TBB_EXTRA_ARGS -DTBB_BUILD_STATIC=On ) -if(TBB_VERSION MATCHES 2018) - set(TBB_VS_VERSION vs2013) -elseif(TBB_VERSION MATCHES 2017) - set(TBB_VS_VERSION vs2012) -else() - set(TBB_VS_VERSION vs2010) -endif() - # CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt ExternalProject_Add(external_tbb URL ${TBB_URI} @@ -38,7 +30,23 @@ ExternalProject_Add(external_tbb URL_HASH MD5=${TBB_HASH} PREFIX ${BUILD_DIR}/tbb PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt && - ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/${TBB_VS_VERSION}/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver + ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/tbb ) + +if (WIN32) + if(BUILD_MODE STREQUAL Release) + ExternalProject_Add_Step(external_tbb after_install + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib + COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/ + DEPENDEES install + ) + endif() + if(BUILD_MODE STREQUAL Debug) + ExternalProject_Add_Step(external_tbb after_install + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib + DEPENDEES install + ) + endif() +endif() diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 7559cb5100f..e0af29ce0a7 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -93,9 +93,9 @@ set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f) set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip) set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a) -set(OPENSUBDIV_VERSION v3_1_1) -set(OPENSUBDIV_Hash 25a9a6a94136b0eb85ce69e9c8cb6ab3) -set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.zip) +set(OPENSUBDIV_VERSION v3_3_3) +set(OPENSUBDIV_Hash 29c79dc01ef616aab02670bed5544ddd) +set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz) set(SDL_VERSION 2.0.4) set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz) @@ -145,16 +145,9 @@ set(PYTHON_SHORT_VERSION_NO_DOTS 37) set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz) set(PYTHON_HASH eb8c2a6b1447d50813c02714af4681f3) -if(UNIX AND NOT APPLE) - # Needed to be compatible with GCC 7, other platforms can upgrade later - set(TBB_VERSION 2017_U7) - set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz) - set(TBB_HASH 364f2a4b80e978f38a69cbf7c466b898) -else() - set(TBB_VERSION 44_20160128) - set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz) - set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc) -endif() +set(TBB_VERSION 2018_U5) +set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz) +set(TBB_HASH ff3ae09f8c23892fbc3008c39f78288f) set(OPENVDB_VERSION 3.1.0) set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz) diff --git a/build_files/build_environment/patches/opensubdiv.diff b/build_files/build_environment/patches/opensubdiv.diff index 9e9cf7ad554..3fc78bf3c18 100644 --- a/build_files/build_environment/patches/opensubdiv.diff +++ b/build_files/build_environment/patches/opensubdiv.diff @@ -1,16 +1,13 @@ - opensubdiv/osd/d3d11VertexBuffer.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/opensubdiv/osd/d3d11VertexBuffer.cpp b/opensubdiv/osd/d3d11VertexBuffer.cpp -index 603cbf4..07e7e0a 100644 ---- a/opensubdiv/osd/d3d11VertexBuffer.cpp -+++ b/opensubdiv/osd/d3d11VertexBuffer.cpp -@@ -81,7 +81,7 @@ D3D11VertexBuffer::UpdateData(const float *src, int startVertex, int numVertices +diff --git a/opensubdiv/far/topologyRefiner.cpp b/opensubdiv/far/topologyRefiner.cpp +index 3754b36e..7fe42bcc 100644 +--- a/opensubdiv/far/topologyRefiner.cpp ++++ b/opensubdiv/far/topologyRefiner.cpp +@@ -263,7 +263,7 @@ namespace internal { + bool IsEmpty() const { return *((int_type*)this) == 0; } - deviceContext->Unmap(_uploadBuffer, 0); + FeatureMask() { Clear(); } +- FeatureMask(Options const & options, Sdc::SchemeType sType) { InitializeFeatures(options, sType); } ++ FeatureMask(Options const & options, Sdc::SchemeType sType) { Clear(); InitializeFeatures(options, sType); } -- D3D11_BOX srcBox = { 0, 0, 0, size, 1, 1 }; -+ D3D11_BOX srcBox = { 0, 0, 0, (UINT) size, 1, 1 }; - deviceContext->CopySubresourceRegion(_buffer, 0, 0, 0, 0, - _uploadBuffer, 0, &srcBox); - } + // These are the two primary methods intended for use -- intialization via a set of Options + // and reduction of the subsequent feature set (which presumes prior initialization with the
\ No newline at end of file |