Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2018-08-19 20:29:04 +0300
committerRay Molenkamp <github@lazydodo.com>2018-08-19 20:44:46 +0300
commitf4c9bdb022cd52f355c06f1e753fe3e5acbdabee (patch)
tree7f0a2a7501a483331952a90bf07da737863c5824 /build_files/build_environment/cmake/openvdb.cmake
parent8309f8ee3465bad3a9cb10da07bcb69852b57dea (diff)
build_environment: opennvdb windows build fixes.
disable openexr namespaces on windows due to linker errors with it. link pthreads due to dependency though blosc
Diffstat (limited to 'build_files/build_environment/cmake/openvdb.cmake')
-rw-r--r--build_files/build_environment/cmake/openvdb.cmake27
1 files changed, 27 insertions, 0 deletions
diff --git a/build_files/build_environment/cmake/openvdb.cmake b/build_files/build_environment/cmake/openvdb.cmake
index 5b70d184201..06b8f59f451 100644
--- a/build_files/build_environment/cmake/openvdb.cmake
+++ b/build_files/build_environment/cmake/openvdb.cmake
@@ -52,6 +52,16 @@ set(OPENVDB_EXTRA_ARGS
-DTBB_LIBRARY_PATH=${LIBDIR}/tbb/lib
)
+if(WIN32)
+ #Namespaces seem to be buggy and cause linker erorrs due to things not
+ #being in the correct namespace
+ #needs to link pthreads due to it being a blosc dependency
+ set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
+ -DOPENEXR_NAMESPACE_VERSIONING=OFF
+ -DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC2.lib
+ )
+endif()
+
ExternalProject_Add(openvdb
URL ${OPENVDB_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -71,3 +81,20 @@ add_dependencies(
external_zlib
external_blosc
)
+
+if(WIN32)
+ if(BUILD_MODE STREQUAL Release)
+ ExternalProject_Add_Step(openvdb after_install
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
+ DEPENDEES install
+ )
+ endif()
+ if(BUILD_MODE STREQUAL Debug)
+ ExternalProject_Add_Step(openvdb after_install
+ COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
+ DEPENDEES install
+ )
+ endif()
+endif()
+