diff --git a/mingw-w64-openvdb/001-build-fixes.patch b/mingw-w64-openvdb/001-build-fixes.patch index 525abb5a14..8b959aa047 100644 --- a/mingw-w64-openvdb/001-build-fixes.patch +++ b/mingw-w64-openvdb/001-build-fixes.patch @@ -21,6 +21,17 @@ #endif /// All classes and public free standing functions must be explicitly marked +--- openvdb-7.0.0/openvdb/PlatformConfig.h.orig 2020-02-18 10:12:13.310699100 +0300 ++++ openvdb-7.0.0/openvdb/PlatformConfig.h 2020-02-18 10:13:47.977635200 +0300 +@@ -11,7 +11,7 @@ + + // By default, assume we're building OpenVDB as a DLL if we're dynamically + // linking in the CRT, unless OPENVDB_STATICLIB is defined. +- #if defined(_DLL) && !defined(OPENVDB_STATICLIB) && !defined(OPENVDB_DLL) ++ #if !defined(OPENVDB_STATICLIB) && !defined(OPENVDB_DLL) + #define OPENVDB_DLL + #endif + --- openvdb-7.0.0/openvdb/io/TempFile.cc.orig 2020-02-18 10:25:55.092941700 +0300 +++ openvdb-7.0.0/openvdb/io/TempFile.cc 2020-02-18 10:26:11.760074100 +0300 @@ -6,7 +6,7 @@ diff --git a/mingw-w64-openvdb/003-msvc-mingw.patch b/mingw-w64-openvdb/003-msvc-mingw.patch new file mode 100644 index 0000000000..7fdd5a0989 --- /dev/null +++ b/mingw-w64-openvdb/003-msvc-mingw.patch @@ -0,0 +1,364 @@ +diff -Naur openvdb-7.0.0-orig/openvdb/io/Archive.cc openvdb-7.0.0/openvdb/io/Archive.cc +--- openvdb-7.0.0-orig/openvdb/io/Archive.cc 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/io/Archive.cc 2020-06-19 10:01:11.064053300 +0300 +@@ -31,7 +31,7 @@ + + #include + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #include // open_existing_file(), close_file() + extern "C" __declspec(dllimport) bool __stdcall GetFileTime( + void* fh, void* ctime, void* atime, void* mtime); +@@ -455,7 +455,7 @@ + mLastWriteTime = this->getLastWriteTime(); + + if (mAutoDelete) { +-#ifndef _MSC_VER ++#ifndef _WIN32 + // On Unix systems, unlink the file so that it gets deleted once it is closed. + ::unlink(mMap.get_name()); + #endif +@@ -485,7 +485,7 @@ + Index64 result = 0; + const char* filename = mMap.get_name(); + +-#ifdef _MSC_VER ++#ifdef _WIN32 + // boost::interprocess::detail was renamed to boost::interprocess::ipcdetail in Boost 1.48. + using namespace boost::interprocess::detail; + using namespace boost::interprocess::ipcdetail; +diff -Naur openvdb-7.0.0-orig/openvdb/io/Compression.h openvdb-7.0.0/openvdb/io/Compression.h +--- openvdb-7.0.0-orig/openvdb/io/Compression.h 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/io/Compression.h 2020-06-19 10:07:32.048448500 +0300 +@@ -419,7 +419,7 @@ + writeData(os, reinterpret_cast(&halfData[0]), count, compression); + } + }; +-#ifdef _MSC_VER ++#ifdef _WIN32 + /// Specialization to avoid double to float warnings in MSVC + template<> + struct HalfWriter { +@@ -442,7 +442,7 @@ + writeData(os, reinterpret_cast(&halfData[0]), count, compression); + } + }; +-#endif // _MSC_VER ++#endif // _WIN32 + + + //////////////////////////////////////// +diff -Naur openvdb-7.0.0-orig/openvdb/io/File.cc openvdb-7.0.0/openvdb/io/File.cc +--- openvdb-7.0.0-orig/openvdb/io/File.cc 2020-06-19 09:46:15.633240000 +0300 ++++ openvdb-7.0.0/openvdb/io/File.cc 2020-06-19 10:09:01.356479800 +0300 +@@ -10,7 +10,7 @@ + #include + #include + #include +-#ifndef _MSC_VER ++#ifndef _WIN32 + #include + #include + #include +@@ -213,7 +213,7 @@ + + std::string mesg = "could not get size of file " + filename(); + +-#ifdef _MSC_VER ++#ifdef _WIN32 + // Get the file size by seeking to the end of the file. + std::ifstream fstrm(filename()); + if (fstrm) { +diff -Naur openvdb-7.0.0-orig/openvdb/points/AttributeArray.h openvdb-7.0.0/openvdb/points/AttributeArray.h +--- openvdb-7.0.0-orig/openvdb/points/AttributeArray.h 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/points/AttributeArray.h 2020-06-19 10:14:28.730787300 +0300 +@@ -156,7 +156,7 @@ + + /// Return a copy of this attribute. + /// @deprecated In-memory compression no longer supported, use AttributeArray::copy() instead. +-#ifndef _MSC_VER ++#ifndef _WIN32 + OPENVDB_DEPRECATED + #endif + virtual AttributeArray::Ptr copyUncompressed() const = 0; +@@ -231,7 +231,7 @@ + /// @deprecated From ABI 6 on, use copyValues() with source-target index pairs. + #if OPENVDB_ABI_VERSION_NUMBER >= 6 + // Windows does not allow base classes to be easily deprecated. +-#ifndef _MSC_VER ++#ifndef _WIN32 + OPENVDB_DEPRECATED + #endif + #endif +@@ -285,13 +285,13 @@ + OPENVDB_DEPRECATED bool isCompressed() const { return false; } + /// @deprecated Previously this compressed the attribute array, now it does nothing. + // Windows does not allow base classes to be deprecated +-#ifndef _MSC_VER ++#ifndef _WIN32 + OPENVDB_DEPRECATED + #endif + virtual bool compress() = 0; + /// @deprecated Previously this uncompressed the attribute array, now it does nothing. + // Windows does not allow base classes to be deprecated +-#ifndef _MSC_VER ++#ifndef _WIN32 + OPENVDB_DEPRECATED + #endif + virtual bool decompress() = 0; +diff -Naur openvdb-7.0.0-orig/openvdb/tools/ValueTransformer.h openvdb-7.0.0/openvdb/tools/ValueTransformer.h +--- openvdb-7.0.0-orig/openvdb/tools/ValueTransformer.h 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/tools/ValueTransformer.h 2020-06-19 10:16:07.301481100 +0300 +@@ -138,7 +138,7 @@ + XformOp& op, bool threaded = true, bool shareOp = true, + MergePolicy merge = MERGE_ACTIVE_STATES); + +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + inline void transformValues(const InIterT& inIter, OutGridT& outGrid, + const XformOp& op, bool threaded = true, bool shareOp = true, +@@ -594,7 +594,7 @@ + } + } + +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + inline void + transformValues(const InIterT& inIter, OutGridT& outGrid, const XformOp& op, +diff -Naur openvdb-7.0.0-orig/openvdb/tree/Tree.h openvdb-7.0.0/openvdb/tree/Tree.h +--- openvdb-7.0.0-orig/openvdb/tree/Tree.h 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/tree/Tree.h 2020-06-19 10:18:41.197865800 +0300 +@@ -766,7 +766,7 @@ + /// @endcode + template + void combine(Tree& other, CombineOp& op, bool prune = false); +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + void combine(Tree& other, const CombineOp& op, bool prune = false); + #endif +@@ -811,7 +811,7 @@ + /// @endcode + template + void combineExtended(Tree& other, ExtendedCombineOp& op, bool prune = false); +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + void combineExtended(Tree& other, const ExtendedCombineOp& op, bool prune = false); + #endif +@@ -846,7 +846,7 @@ + /// @endcode + template + void combine2(const Tree& a, const OtherTreeType& b, CombineOp& op, bool prune = false); +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + void combine2(const Tree& a, const OtherTreeType& b, const CombineOp& op, bool prune = false); + #endif +@@ -927,7 +927,7 @@ + template + void combine2Extended(const Tree& a, const OtherTreeType& b, ExtendedCombineOp& op, + bool prune = false); +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + void combine2Extended(const Tree& a, const OtherTreeType& b, const ExtendedCombineOp&, + bool prune = false); +@@ -1901,7 +1901,7 @@ + + /// @internal This overload is needed (for ICC and GCC, but not for VC) to disambiguate + /// code like this: aTree.combine(bTree, MyCombineOp(...)). +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + template + inline void +@@ -1925,7 +1925,7 @@ + + /// @internal This overload is needed (for ICC and GCC, but not for VC) to disambiguate + /// code like this: aTree.combineExtended(bTree, MyCombineOp(...)). +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + template + inline void +@@ -1949,7 +1949,7 @@ + + /// @internal This overload is needed (for ICC and GCC, but not for VC) to disambiguate + /// code like this: tree.combine2(aTree, bTree, MyCombineOp(...)). +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + template + inline void +@@ -1975,7 +1975,7 @@ + /// @internal This overload is needed (for ICC and GCC, but not for VC) to disambiguate + /// code like the following, where the functor argument is a temporary: + /// tree.combine2Extended(aTree, bTree, MyCombineOp(...)). +-#ifndef _MSC_VER ++#ifndef _WIN32 + template + template + inline void +diff -Naur openvdb-7.0.0-orig/openvdb/unittest/TestAttributeArray.cc openvdb-7.0.0/openvdb/unittest/TestAttributeArray.cc +--- openvdb-7.0.0-orig/openvdb/unittest/TestAttributeArray.cc 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/unittest/TestAttributeArray.cc 2020-06-19 10:19:10.384757000 +0300 +@@ -27,7 +27,7 @@ + #include + #include + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #include // open_existing_file(), close_file() + // boost::interprocess::detail was renamed to boost::interprocess::ipcdetail in Boost 1.48. + // Ensure that both namespaces exist. +@@ -1419,7 +1419,7 @@ + + std::string tempDir; + if (const char* dir = std::getenv("TMPDIR")) tempDir = dir; +-#ifdef _MSC_VER ++#ifdef _WIN32 + if (tempDir.empty()) { + char tempDirBuffer[MAX_PATH+1]; + int tempDirLen = GetTempPath(MAX_PATH+1, tempDirBuffer); +diff -Naur openvdb-7.0.0-orig/openvdb/unittest/TestPointConversion.cc openvdb-7.0.0/openvdb/unittest/TestPointConversion.cc +--- openvdb-7.0.0-orig/openvdb/unittest/TestPointConversion.cc 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/unittest/TestPointConversion.cc 2020-06-19 12:00:35.389981600 +0300 +@@ -9,7 +9,7 @@ + #include + #include + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #include + #endif + +@@ -277,7 +277,7 @@ + + std::string tempDir; + if (const char* dir = std::getenv("TMPDIR")) tempDir = dir; +-#ifdef _MSC_VER ++#ifdef _WIN32 + if (tempDir.empty()) { + char tempDirBuffer[MAX_PATH+1]; + int tempDirLen = GetTempPath(MAX_PATH+1, tempDirBuffer); +diff -Naur openvdb-7.0.0-orig/openvdb/unittest/TestPointCount.cc openvdb-7.0.0/openvdb/unittest/TestPointCount.cc +--- openvdb-7.0.0-orig/openvdb/unittest/TestPointCount.cc 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/unittest/TestPointCount.cc 2020-06-19 12:00:58.426944400 +0300 +@@ -16,7 +16,7 @@ + #include + #include + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #include + #endif + +@@ -207,7 +207,7 @@ + + std::string tempDir; + if (const char* dir = std::getenv("TMPDIR")) tempDir = dir; +-#ifdef _MSC_VER ++#ifdef _WIN32 + if (tempDir.empty()) { + char tempDirBuffer[MAX_PATH+1]; + int tempDirLen = GetTempPath(MAX_PATH+1, tempDirBuffer); +@@ -546,7 +546,7 @@ + + std::string tempDir; + if (const char* dir = std::getenv("TMPDIR")) tempDir = dir; +-#ifdef _MSC_VER ++#ifdef _WIN32 + if (tempDir.empty()) { + char tempDirBuffer[MAX_PATH+1]; + int tempDirLen = GetTempPath(MAX_PATH+1, tempDirBuffer); +diff -Naur openvdb-7.0.0-orig/openvdb/unittest/TestPointDelete.cc openvdb-7.0.0/openvdb/unittest/TestPointDelete.cc +--- openvdb-7.0.0-orig/openvdb/unittest/TestPointDelete.cc 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/unittest/TestPointDelete.cc 2020-06-19 12:01:13.351915700 +0300 +@@ -9,7 +9,7 @@ + #include + #include + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #include + #endif + +diff -Naur openvdb-7.0.0-orig/openvdb/unittest/TestPointGroup.cc openvdb-7.0.0/openvdb/unittest/TestPointGroup.cc +--- openvdb-7.0.0-orig/openvdb/unittest/TestPointGroup.cc 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/unittest/TestPointGroup.cc 2020-06-19 12:01:32.402067800 +0300 +@@ -13,7 +13,7 @@ + #include + #include + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #include + #endif + +@@ -502,7 +502,7 @@ + + std::string tempDir; + if (const char* dir = std::getenv("TMPDIR")) tempDir = dir; +-#ifdef _MSC_VER ++#ifdef _WIN32 + if (tempDir.empty()) { + char tempDirBuffer[MAX_PATH+1]; + int tempDirLen = GetTempPath(MAX_PATH+1, tempDirBuffer); +diff -Naur openvdb-7.0.0-orig/openvdb/unittest/TestStreamCompression.cc openvdb-7.0.0/openvdb/unittest/TestStreamCompression.cc +--- openvdb-7.0.0-orig/openvdb/unittest/TestStreamCompression.cc 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb/unittest/TestStreamCompression.cc 2020-06-19 12:02:28.116963900 +0300 +@@ -26,7 +26,7 @@ + + #include + +-#ifdef _MSC_VER ++#ifdef _WIN32 + #include // open_existing_file(), close_file() + // boost::interprocess::detail was renamed to boost::interprocess::ipcdetail in Boost 1.48. + // Ensure that both namespaces exist. +@@ -72,7 +72,7 @@ + { + mLastWriteTime = 0; + const char* regionFilename = mMap.get_name(); +-#ifdef _MSC_VER ++#ifdef _WIN32 + using namespace boost::interprocess::detail; + using namespace boost::interprocess::ipcdetail; + using openvdb::Index64; +@@ -481,7 +481,7 @@ + + std::string tempDir; + if (const char* dir = std::getenv("TMPDIR")) tempDir = dir; +-#ifdef _MSC_VER ++#ifdef _WIN32 + if (tempDir.empty()) { + char tempDirBuffer[MAX_PATH+1]; + int tempDirLen = GetTempPath(MAX_PATH+1, tempDirBuffer); +diff -Naur openvdb-7.0.0-orig/openvdb_houdini/ParmFactory.h openvdb-7.0.0/openvdb_houdini/ParmFactory.h +--- openvdb-7.0.0-orig/openvdb_houdini/ParmFactory.h 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb_houdini/ParmFactory.h 2020-06-19 12:17:43.168133700 +0300 +@@ -231,7 +231,7 @@ + + #if defined(GCC3) + #define IS_DEPRECATED __attribute__ ((deprecated)) +-#elif defined(_MSC_VER) ++#elif defined(_WIN32) + #define IS_DEPRECATED __declspec(deprecated) + #else + #define IS_DEPRECATED +diff -Naur openvdb-7.0.0-orig/openvdb_houdini/PointUtils.cc openvdb-7.0.0/openvdb_houdini/PointUtils.cc +--- openvdb-7.0.0-orig/openvdb_houdini/PointUtils.cc 2019-12-06 23:11:33.000000000 +0300 ++++ openvdb-7.0.0/openvdb_houdini/PointUtils.cc 2020-06-19 12:18:27.903734800 +0300 +@@ -1804,7 +1804,7 @@ + } // unnamed namespace + + +-#ifdef _MSC_VER ++#ifdef _WIN32 + + OPENVDB_HOUDINI_API const PRM_ChoiceList + VDBPointsGroupMenuInput1(PRM_CHOICELIST_TOGGLE, sopBuildVDBPointsGroupMenu); diff --git a/mingw-w64-openvdb/004-python-module-ext.patch b/mingw-w64-openvdb/004-python-module-ext.patch new file mode 100644 index 0000000000..caf9ff01ab --- /dev/null +++ b/mingw-w64-openvdb/004-python-module-ext.patch @@ -0,0 +1,13 @@ +--- a/openvdb/python/CMakeLists.txt ++++ b/openvdb/python/CMakeLists.txt +@@ -271,7 +271,9 @@ + if(UNIX) + set_target_properties(pyopenvdb PROPERTIES SUFFIX ".so") # must be .so (not .dylib) + elseif(WIN32) +- set_target_properties(pyopenvdb PROPERTIES SUFFIX ".pyd") # .pyd on windows ++ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig, sys; get = distutils.sysconfig.get_config_var; sys.stdout.write(get('EXT_SUFFIX') or get('SO') or '.pyd');" ++ OUTPUT_VARIABLE PYTHON_MOD_EXT) ++ set_target_properties(pyopenvdb PROPERTIES SUFFIX "${PYTHON_MOD_EXT}") + endif() + + target_include_directories(pyopenvdb SYSTEM PUBLIC ${OPENVDB_PYTHON_INCLUDES}) diff --git a/mingw-w64-openvdb/609b97a05b01be22ecafe6f66fe187abb800657f.patch b/mingw-w64-openvdb/609b97a05b01be22ecafe6f66fe187abb800657f.patch new file mode 100644 index 0000000000..66b6332579 --- /dev/null +++ b/mingw-w64-openvdb/609b97a05b01be22ecafe6f66fe187abb800657f.patch @@ -0,0 +1,109 @@ +From 609b97a05b01be22ecafe6f66fe187abb800657f Mon Sep 17 00:00:00 2001 +From: Nick Avramoussis <4256455+Idclip@users.noreply.github.com> +Date: Mon, 24 Feb 2020 12:20:09 +0000 +Subject: [PATCH] Only require CXX in CMake projects + +Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com> +--- + CMakeLists.txt | 2 +- + openvdb/CMakeLists.txt | 2 +- + openvdb/cmd/CMakeLists.txt | 2 +- + openvdb/python/CMakeLists.txt | 2 +- + openvdb/unittest/CMakeLists.txt | 3 ++- + openvdb_houdini/CMakeLists.txt | 2 +- + openvdb_maya/CMakeLists.txt | 2 +- + 7 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f439a74cf..eb95cde94 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,7 +43,7 @@ + # note: cmake_minimum_required must be called before project commands to + # ensure policy scope is set up correctly + cmake_minimum_required(VERSION 3.3) +-project(OpenVDB) ++project(OpenVDB LANGUAGES CXX) + + ###### OpenVDB Build/Component Options + +diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt +index 9501ff1ac..60bced343 100644 +--- a/openvdb/CMakeLists.txt ++++ b/openvdb/CMakeLists.txt +@@ -8,7 +8,7 @@ + #]=======================================================================] + + cmake_minimum_required(VERSION 3.3) +-project(OpenVDBCore) ++project(OpenVDBCore LANGUAGES CXX) + + # Monitoring _ROOT variables + if(POLICY CMP0074) +diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt +index 1e5ef0db6..5476de434 100644 +--- a/openvdb/cmd/CMakeLists.txt ++++ b/openvdb/cmd/CMakeLists.txt +@@ -8,7 +8,7 @@ + #]=======================================================================] + + cmake_minimum_required(VERSION 3.3) +-project(OpenVDBBinaries) ++project(OpenVDBBinaries LANGUAGES CXX) + + # Monitoring _ROOT variables + if(POLICY CMP0074) +diff --git a/openvdb/python/CMakeLists.txt b/openvdb/python/CMakeLists.txt +index f26043201..2a7670326 100644 +--- a/openvdb/python/CMakeLists.txt ++++ b/openvdb/python/CMakeLists.txt +@@ -8,7 +8,7 @@ + #]=======================================================================] + + cmake_minimum_required(VERSION 3.3) +-project(OpenVDBPython) ++project(OpenVDBPython LANGUAGES CXX) + + # Monitoring _ROOT variables + if(POLICY CMP0074) +diff --git a/openvdb/unittest/CMakeLists.txt b/openvdb/unittest/CMakeLists.txt +index 2695492fc..14bbcad82 100644 +--- a/openvdb/unittest/CMakeLists.txt ++++ b/openvdb/unittest/CMakeLists.txt +@@ -7,8 +7,9 @@ + + #]=======================================================================] + +-project(OpenVDBUnitTests) + cmake_minimum_required(VERSION 3.3) ++project(OpenVDBUnitTests LANGUAGES CXX) ++ + # Monitoring _ROOT variables + if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +diff --git a/openvdb_houdini/CMakeLists.txt b/openvdb_houdini/CMakeLists.txt +index 1635815c0..98ec65fd7 100644 +--- a/openvdb_houdini/CMakeLists.txt ++++ b/openvdb_houdini/CMakeLists.txt +@@ -34,7 +34,7 @@ + #]=======================================================================] + + cmake_minimum_required(VERSION 3.3) +-project(OpenVDBHoudini) ++project(OpenVDBHoudini LANGUAGES CXX) + + if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +diff --git a/openvdb_maya/CMakeLists.txt b/openvdb_maya/CMakeLists.txt +index 5830b0069..81d100d71 100644 +--- a/openvdb_maya/CMakeLists.txt ++++ b/openvdb_maya/CMakeLists.txt +@@ -8,7 +8,7 @@ + #]=======================================================================] + + cmake_minimum_required(VERSION 3.3) +-project(OpenVDBMaya) ++project(OpenVDBMaya LANGUAGES CXX) + + # Monitoring _ROOT variables + if(POLICY CMP0074) diff --git a/mingw-w64-openvdb/895974a3a913da4b26efaa2128f0674338f76f71.patch b/mingw-w64-openvdb/895974a3a913da4b26efaa2128f0674338f76f71.patch new file mode 100644 index 0000000000..b1ba2f564e --- /dev/null +++ b/mingw-w64-openvdb/895974a3a913da4b26efaa2128f0674338f76f71.patch @@ -0,0 +1,189 @@ +From 895974a3a913da4b26efaa2128f0674338f76f71 Mon Sep 17 00:00:00 2001 +From: Nick Avramoussis <4256455+Idclip@users.noreply.github.com> +Date: Tue, 25 Feb 2020 18:25:49 +0000 +Subject: [PATCH] Improved the CMake logic for the OpenVDB python module and + added better Windows support + +Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com> +--- + openvdb/python/CMakeLists.txt | 105 ++++++++++++++++++++-------------- + 1 file changed, 61 insertions(+), 44 deletions(-) + +diff --git a/openvdb/python/CMakeLists.txt b/openvdb/python/CMakeLists.txt +index f26043201..91a622aea 100644 +--- a/openvdb/python/CMakeLists.txt ++++ b/openvdb/python/CMakeLists.txt +@@ -24,6 +24,9 @@ option(OPENVDB_PYTHON_WRAP_ALL_GRID_TYPES [=[ + Expose (almost) all of the grid types in the python module. Otherwise, only FloatGrid, BoolGrid and + Vec3SGrid will be exposed (see, e.g., exportIntGrid() in python/pyIntGrid.cc). Compiling the Python + module with this ON can be very memory-intensive.]=] OFF) ++option(OPENVDB_BUILD_PYTHON_UNITTESTS [=[ ++"Include the OpenVDB Python unit test. Requries a python interpreter]=] ++${OPENVDB_BUILD_UNITTESTS}) + + ######################################################################### + +@@ -49,8 +52,14 @@ set(OPENVDB_PYTHON_INCLUDES) + # the minimum python version is MINIMUM_PYTHON_VERSION - however this cannot + # be provided to find_package(Python) with differing major versions. e.g. + # calls to find_package(Python 2.7) fails if python3 is found on the system. +-function(OPENVDB_CHECK_PYTHON_VERSION _PY_VERSION _PY_PATH) +- if(_PY_VERSION VERSION_LESS MINIMUM_PYTHON_VERSION) ++function(OPENVDB_CHECK_PYTHON_VERSION) ++ set(_PY_VERSION ${ARGV0}) ++ set(_PY_PATH ${ARGV1}) ++ if(NOT _PY_VERSION) ++ message(FATAL_ERROR "Could NOT find Python (Required is at least version " ++ "\"${MINIMUM_PYTHON_VERSION}\")" ++ ) ++ elseif(_PY_VERSION VERSION_LESS MINIMUM_PYTHON_VERSION) + message(FATAL_ERROR "Could NOT find Python: Found unsuitable version \"${_PY_VERSION}\"" + "but required is at least \"${MINIMUM_PYTHON_VERSION}\" (found ${_PY_PATH})" + ) +@@ -70,7 +79,9 @@ endfunction() + # Note that the Interpreter component is only required for the python test + if(${CMAKE_VERSION} VERSION_LESS 3.12) + # CMake < 3.12 +- find_package(PythonInterp REQUIRED) ++ if(OPENVDB_BUILD_PYTHON_UNITTESTS) ++ find_package(PythonInterp REQUIRED) ++ endif() + find_package(PythonLibs REQUIRED) + + # Alias variables to newer names +@@ -83,7 +94,7 @@ if(${CMAKE_VERSION} VERSION_LESS 3.12) + + list(APPEND OPENVDB_PYTHON_INCLUDES ${PYTHON_INCLUDE_DIR}) + +- OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_EXECUTABLE}) ++ OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${PYTHON_INCLUDE_DIR}) + + if(USE_NUMPY) + # Note: This uses our custom backport in cmake/backports +@@ -92,8 +103,12 @@ if(${CMAKE_VERSION} VERSION_LESS 3.12) + endif() + elseif(${CMAKE_VERSION} VERSION_LESS 3.14) + # CMake < 3.14 +- find_package(Python QUIET COMPONENTS Interpreter Development) +- OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_EXECUTABLE}) ++ if(OPENVDB_BUILD_PYTHON_UNITTESTS) ++ find_package(Python QUIET COMPONENTS Interpreter Development) ++ else() ++ find_package(Python QUIET COMPONENTS Development) ++ endif() ++ OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_INCLUDE_DIRS}) + list(APPEND OPENVDB_PYTHON_DEPS Python::Python) + + if(USE_NUMPY) +@@ -103,25 +118,31 @@ elseif(${CMAKE_VERSION} VERSION_LESS 3.14) + endif() + else() + # CMake >= 3.14 +- if(USE_NUMPY) +- find_package(Python QUIET REQUIRED COMPONENTS Interpreter Development NumPy) ++ if(OPENVDB_BUILD_PYTHON_UNITTESTS) ++ find_package(Python QUIET COMPONENTS Interpreter Development) + else() +- find_package(Python QUIET REQUIRED COMPONENTS Interpreter Development) ++ find_package(Python QUIET COMPONENTS Development) + endif() + +- OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_EXECUTABLE}) ++ OPENVDB_CHECK_PYTHON_VERSION(${Python_VERSION} ${Python_INCLUDE_DIRS}) + list(APPEND OPENVDB_PYTHON_DEPS Python::Python) + +- # Check NumPy version +- if(USE_NUMPY AND (Python_NumPy_VERSION VERSION_LESS MINIMUM_NUMPY_VERSION)) +- message(FATAL_ERROR "Could NOT find NumPy (Required is at least version " ++ if(USE_NUMPY) ++ find_package(Python QUIET COMPONENTS NumPy) ++ if(NOT TARGET Python::NumPy) ++ message(FATAL_ERROR "Could NOT find NumPy (Required is at least version " ++ "\"${MINIMUM_NUMPY_VERSION}\")" ++ ) ++ elseif(Python_NumPy_VERSION VERSION_LESS MINIMUM_NUMPY_VERSION) ++ message(FATAL_ERROR "Could NOT find NumPy: Found unsuitable version \"${Python_NumPy_VERSION}\"" ++ "but required is at least \"${MINIMUM_NUMPY_VERSION}\" (found ${Python_NumPy_INCLUDE_DIRS})" ++ ) ++ else() ++ message(STATUS "Found NumPy: ${Python_NumPy_INCLUDE_DIRS} (found suitable " ++ "version \"${Python_NumPy_VERSION}\", minimum required is " + "\"${MINIMUM_NUMPY_VERSION}\")" + ) +- elseif(USE_NUMPY) +- message(STATUS "Found NumPy: ${Python_NumPy_INCLUDE_DIRS} (found suitable " +- "version \"${Python_NumPy_VERSION}\", minimum required is " +- "\"${MINIMUM_NUMPY_VERSION}\")" +- ) ++ endif() + list(APPEND OPENVDB_PYTHON_DEPS Python::NumPy) + endif() + endif() +@@ -237,37 +258,32 @@ if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY) + ) + endif() + +-add_library(pyopenvdb SHARED +- ${OPENVDB_PYTHON_MODULE_SOURCE_FILES} +-) ++# @todo pyopenvdb is currently advertised as "linkable" by extension libraries ++# so we have to mark it as SHARED. Really it should be MODULE, as the ++# amount of manipulation required for native python support nullifies ++# the ability for compilers to link against it (suffix/prefix renaming). ++# A proper shared lib should be built with the functions required for ++# extension (pyopenvdb.h) and a further module lib should be added ++# that can be imported. + +-target_include_directories(pyopenvdb +- SYSTEM PUBLIC ${OPENVDB_PYTHON_INCLUDES} +-) ++add_library(pyopenvdb SHARED ${OPENVDB_PYTHON_MODULE_SOURCE_FILES}) ++set_target_properties(pyopenvdb PROPERTIES PREFIX "") # no 'lib' prefix ++if(UNIX) ++ set_target_properties(pyopenvdb PROPERTIES SUFFIX ".so") # must be .so (not .dylib) ++elseif(WIN32) ++ set_target_properties(pyopenvdb PROPERTIES SUFFIX ".pyd") # .pyd on windows ++endif() ++ ++target_include_directories(pyopenvdb SYSTEM PUBLIC ${OPENVDB_PYTHON_INCLUDES}) ++target_link_libraries(pyopenvdb PUBLIC ${OPENVDB_PYTHON_DEPENDENT_LIBS}) + + if(OPENVDB_PYTHON_WRAP_ALL_GRID_TYPES) + target_compile_definitions(pyopenvdb PRIVATE "-DPY_OPENVDB_WRAP_ALL_GRID_TYPES") + endif() +- + if(USE_NUMPY) + target_compile_definitions(pyopenvdb PUBLIC "-DPY_OPENVDB_USE_NUMPY") + endif() + +-target_link_libraries(pyopenvdb +- ${OPENVDB_PYTHON_DEPENDENT_LIBS} +-) +- +-set_target_properties(pyopenvdb PROPERTIES +- PREFIX "" # no 'lib' prefix +-) +- +-if(UNIX) +- # must be .so (not .dylib) +- set_target_properties(pyopenvdb PROPERTIES +- SUFFIX ".so" +- ) +-endif() +- + if(OPENVDB_ENABLE_RPATH) + # @todo There is probably a better way to do this for imported targets + set(RPATHS "") +@@ -306,7 +322,8 @@ install(FILES ${PYTHON_PUBLIC_INCLUDE_NAMES} DESTINATION ${OPENVDB_INSTALL_INCLU + + # pytest + +-add_test(pytest ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/TestOpenVDB.py -v) +-set_tests_properties(pytest PROPERTIES ENVIRONMENT "PYTHONPATH=$ENV{PYTHONPATH}:${CMAKE_CURRENT_BINARY_DIR}") +- +- ++if(OPENVDB_BUILD_PYTHON_UNITTESTS) ++ add_test(pytest ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/TestOpenVDB.py -v) ++ set_tests_properties(pytest PROPERTIES ++ ENVIRONMENT "PYTHONPATH=$ENV{PYTHONPATH}:${CMAKE_CURRENT_BINARY_DIR}") ++endif() diff --git a/mingw-w64-openvdb/PKGBUILD b/mingw-w64-openvdb/PKGBUILD index c3b766b20d..7abe587955 100644 --- a/mingw-w64-openvdb/PKGBUILD +++ b/mingw-w64-openvdb/PKGBUILD @@ -4,7 +4,7 @@ _realname=openvdb pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=7.0.0 -pkgrel=2 +pkgrel=3 pkgdesc="OpenVDB is an open source C++ library comprising a novel hierarchical data structure and a large suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids (mingw-w64)" arch=('any') url="http://www.openvdb.org/" @@ -15,20 +15,39 @@ depends=("${MINGW_PACKAGE_PREFIX}-blosc" "${MINGW_PACKAGE_PREFIX}-openexr" "${MINGW_PACKAGE_PREFIX}-zlib") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" - #"${MINGW_PACKAGE_PREFIX}-cppunit" - "${MINGW_PACKAGE_PREFIX}-python") -options=('strip' 'buildflags' '!debug') + "${MINGW_PACKAGE_PREFIX}-python" + "${MINGW_PACKAGE_PREFIX}-python-numpy") +checkdepends=("${MINGW_PACKAGE_PREFIX}-cppunit") +options=('!strip' 'buildflags' '!debug') source=(${_realname}-${pkgver}.tar.gz::https://github.com/AcademySoftwareFoundation/openvdb/archive/v${pkgver}.tar.gz 001-build-fixes.patch - 002-fix-find-cppunit.patch) + 002-fix-find-cppunit.patch + 003-msvc-mingw.patch + 004-python-module-ext.patch + 609b97a05b01be22ecafe6f66fe187abb800657f.patch + af0672f73140edd0bf489bcac6dd624677ac241c.patch + 895974a3a913da4b26efaa2128f0674338f76f71.patch) sha256sums=('97bc8ae35ef7ccbf49a4e25cb73e8c2eccae6b235bac86f2150707efcd1e910d' - '778e9f980a619bb152d6b22432783e856eac4c99bdd370cb08652b6fb99acfd2' - '82f1a627aaabb7bf3168998a5914fd9379e6c035a9106994523bf138b12fd0a8') + '6e5e5b5d9130107bf8a7de4101eedc1fe2e737fc01cbe3a5d750e2b57ef10385' + '82f1a627aaabb7bf3168998a5914fd9379e6c035a9106994523bf138b12fd0a8' + '83c82e16f97439c953b2fb3cfb6cadda3912849bdf80e79d523ef259838aee17' + '22d486b0aae8945cba65e0b3e5382157ba46f8db8fc042c8d157ec5b8df7674d' + 'b6524dfaae7a7ce61df62010e50179032d87841d993aeb3816bff27faaded871' + '24f76c82ed6e915c1f901e9c48b17efb7a6b8dda4308c7720527a323ba9b0237' + 'a316de64eaf08fab891b253a9ffa9573898e73cd0cf8b5c20685d6a6db8686b5') prepare() { cd ${srcdir}/openvdb-${pkgver} patch -p1 -i ${srcdir}/001-build-fixes.patch patch -p1 -i ${srcdir}/002-fix-find-cppunit.patch + patch -p1 -i ${srcdir}/003-msvc-mingw.patch + + # Upstream patches + patch -p1 -i ${srcdir}/609b97a05b01be22ecafe6f66fe187abb800657f.patch + patch -p1 -i ${srcdir}/af0672f73140edd0bf489bcac6dd624677ac241c.patch + patch -p1 -i ${srcdir}/895974a3a913da4b26efaa2128f0674338f76f71.patch + + patch -p1 -i ${srcdir}/004-python-module-ext.patch } build() { @@ -41,7 +60,7 @@ build() { [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - + CFLAGS+=" -D_USE_MATH_DEFINES" CXXFLAGS+=" -D_USE_MATH_DEFINES" @@ -53,6 +72,7 @@ build() { -DUSE_EXR=ON \ -DOPENVDB_CORE_SHARED=ON \ -DOPENVDB_BUILD_PYTHON_MODULE=ON \ + -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python \ ${extra_config} \ ../openvdb-${pkgver} diff --git a/mingw-w64-openvdb/af0672f73140edd0bf489bcac6dd624677ac241c.patch b/mingw-w64-openvdb/af0672f73140edd0bf489bcac6dd624677ac241c.patch new file mode 100644 index 0000000000..1a5c26cdff --- /dev/null +++ b/mingw-w64-openvdb/af0672f73140edd0bf489bcac6dd624677ac241c.patch @@ -0,0 +1,233 @@ +From af0672f73140edd0bf489bcac6dd624677ac241c Mon Sep 17 00:00:00 2001 +From: Nick Avramoussis <4256455+Idclip@users.noreply.github.com> +Date: Sun, 26 Apr 2020 15:55:09 +0100 +Subject: [PATCH] Improved various CMake defines passed through the OpenVDB + core lib + +Signed-off-by: Nick Avramoussis <4256455+Idclip@users.noreply.github.com> +--- + openvdb/CMakeLists.txt | 83 ++++++++++++++++----------------- + openvdb/cmd/CMakeLists.txt | 12 ----- + openvdb/python/CMakeLists.txt | 2 +- + openvdb/unittest/CMakeLists.txt | 13 ------ + 4 files changed, 42 insertions(+), 68 deletions(-) + +diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt +index 60bced343..65ff589f0 100644 +--- a/openvdb/CMakeLists.txt ++++ b/openvdb/CMakeLists.txt +@@ -99,7 +99,7 @@ else() + ) + endif() + +-if(OPENVDB_CORE_SHARED) ++if(OPENVDB_CORE_SHARED AND NOT Boost_USE_STATIC_LIBS) + # @note Both of these must be set for Boost 1.70 (VFX2020) to link against + # boost shared libraries (more specifically libraries built with -fPIC). + # http://boost.2283326.n4.nabble.com/CMake-config-scripts-broken-in-1-70-td4708957.html +@@ -145,6 +145,14 @@ set(OPENVDB_CORE_DEPENDENT_LIBS + IlmBase::Half + ) + ++if(WIN32) ++ if(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING) ++ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS ++ Boost::disable_autolinking # add -DBOOST_ALL_NO_LIB ++ ) ++ endif() ++endif() ++ + if(USE_EXR) + list(APPEND OPENVDB_CORE_DEPENDENT_LIBS + IlmBase::IlmThread +@@ -187,19 +195,6 @@ endif() + + ########################################################################## + +-if(WIN32) +- # Because of implicit linking! +- link_directories(${Boost_LIBRARY_DIR}) +- if(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING) +- add_definitions(-DBOOST_ALL_NO_LIB) +- endif() +-endif() +- +-# @todo Should be target definitions +-if(WIN32) +- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) +-endif() +- + ##### Core library configuration + + set(OPENVDB_LIBRARY_SOURCE_FILES +@@ -403,25 +398,30 @@ endif() + + ########################################################################## + +-# Configure c flags +- +-set(OPENVDB_CORE_PRIVATE_DEFINES) +-set(OPENVDB_CORE_PUBLIC_DEFINES) ++# Configure (static and shared lib) C flags + + # Private defines (not inherited by dependent projects) +- +-list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_PRIVATE") ++list(APPEND OPENVDB_CORE_PRIVATE_DEFINES -DOPENVDB_PRIVATE) + if(USE_BLOSC) +- list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_USE_BLOSC") ++ list(APPEND OPENVDB_CORE_PRIVATE_DEFINES -DOPENVDB_USE_BLOSC) + endif() + + # Public defines +- ++if(WIN32) ++ # @note OPENVDB_OPENEXR_STATICLIB is old functionality from the makefiles ++ # used in PlatformConfig.h to configure EXR exports. Once this file ++ # is completely removed, this define can be too ++ get_target_property(ILMBASE_LIB_TYPE IlmBase::Half TYPE) ++ if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY)) ++ list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_OPENEXR_STATICLIB) ++ endif() ++ list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -D_WIN32 -DNOMINMAX) ++endif() + if(USE_EXR) +- list(APPEND OPENVDB_CORE_PUBLIC_DEFINES "-DOPENVDB_TOOLS_RAYTRACER_USE_EXR") ++ list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_TOOLS_RAYTRACER_USE_EXR) + endif() + if(USE_LOG4CPLUS) +- list(APPEND OPENVDB_CORE_PUBLIC_DEFINES "-DOPENVDB_USE_LOG4CPLUS") ++ list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_USE_LOG4CPLUS) + endif() + + ########################################################################## +@@ -434,22 +434,22 @@ if(OPENVDB_CORE_STATIC) + PRIVATE . + ) + +- target_compile_definitions(openvdb_static PRIVATE ${OPENVDB_CORE_PRIVATE_DEFINES}) +- target_compile_definitions(openvdb_static PUBLIC ${OPENVDB_CORE_PUBLIC_DEFINES}) ++ target_compile_definitions(openvdb_static ++ PUBLIC ${OPENVDB_CORE_PUBLIC_DEFINES} ++ PRIVATE ${OPENVDB_CORE_PRIVATE_DEFINES} ++ ) ++ ++ target_link_libraries(openvdb_static ++ PUBLIC ${OPENVDB_CORE_DEPENDENT_LIBS} ++ ) + + set_target_properties(openvdb_static + PROPERTIES OUTPUT_NAME ${OPENVDB_STATIC_LIBRARY_NAME} + ) + + if(WIN32) +- set_target_properties(openvdb_static +- PROPERTIES PREFIX "lib" +- ) ++ set_target_properties(openvdb_static PROPERTIES PREFIX "lib") + endif() +- +- target_link_libraries(openvdb_static +- ${OPENVDB_CORE_DEPENDENT_LIBS} +- ) + endif() + + # Configure shared build +@@ -460,8 +460,14 @@ if(OPENVDB_CORE_SHARED) + PRIVATE . + ) + +- target_compile_definitions(openvdb_shared PRIVATE ${OPENVDB_CORE_PRIVATE_DEFINES}) +- target_compile_definitions(openvdb_shared PUBLIC ${OPENVDB_CORE_PUBLIC_DEFINES}) ++ target_compile_definitions(openvdb_shared ++ PUBLIC ${OPENVDB_CORE_PUBLIC_DEFINES} -DOPENVDB_DLL ++ PRIVATE ${OPENVDB_CORE_PRIVATE_DEFINES} ++ ) ++ ++ target_link_libraries(openvdb_shared ++ PUBLIC ${OPENVDB_CORE_DEPENDENT_LIBS} ++ ) + + set_target_properties(openvdb_shared + PROPERTIES +@@ -470,10 +476,6 @@ if(OPENVDB_CORE_SHARED) + VERSION ${OpenVDB_MAJOR_VERSION}.${OpenVDB_MINOR_VERSION}.${OpenVDB_PATCH_VERSION} + ) + +- target_link_libraries(openvdb_shared +- ${OPENVDB_CORE_DEPENDENT_LIBS} +- ) +- + if(OPENVDB_ENABLE_RPATH) + # @todo There is probably a better way to do this for imported targets + list(APPEND RPATHS +@@ -491,9 +493,6 @@ if(OPENVDB_CORE_SHARED) + endif() + endif() + +-unset(OPENVDB_CORE_PRIVATE_DEFINES) +-unset(OPENVDB_CORE_PUBLIC_DEFINES) +- + ########################################################################## + + # Installation +diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt +index 11de7df3b..0dc9f4287 100644 +--- a/openvdb/cmd/CMakeLists.txt ++++ b/openvdb/cmd/CMakeLists.txt +@@ -45,18 +45,6 @@ set(OPENVDB_BINARIES_DEPENDENT_LIBS + + ########################################################################## + +-if(WIN32) +- # Because of implicit linking! +- link_directories(${Boost_LIBRARY_DIR}) +- if(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING) +- add_definitions(-DBOOST_ALL_NO_LIB) +- endif() +-endif() +- +-if(WIN32) +- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) +-endif() +- + # rpath handling + + set(RPATHS "") +diff --git a/openvdb/python/CMakeLists.txt b/openvdb/python/CMakeLists.txt +index 94455080c..fc858271a 100644 +--- a/openvdb/python/CMakeLists.txt ++++ b/openvdb/python/CMakeLists.txt +@@ -156,7 +156,7 @@ if(USE_NUMPY) + endif() + endif() + +-if(TARGET openvdb_shared) ++if(TARGET openvdb_shared AND NOT Boost_USE_STATIC_LIBS) + # @note Both of these must be set for Boost 1.70 (VFX2020) to link against + # boost shared libraries (more specifically libraries built with -fPIC). + # http://boost.2283326.n4.nabble.com/CMake-config-scripts-broken-in-1-70-td4708957.html +diff --git a/openvdb/unittest/CMakeLists.txt b/openvdb/unittest/CMakeLists.txt +index 14bbcad82..5640e805e 100644 +--- a/openvdb/unittest/CMakeLists.txt ++++ b/openvdb/unittest/CMakeLists.txt +@@ -40,19 +40,6 @@ set(OPENVDB_TEST_DEPENDENT_LIBS + + ########################################################################## + +-if(WIN32 AND OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING) +- add_definitions(-DBOOST_ALL_NO_LIB) +-endif() +- +-if(WIN32) +- # Because of implicit linking! +- link_directories(${Boost_LIBRARY_DIR}) +-endif() +- +-if(WIN32) +- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) +-endif() +- + ##### VDB unit tests + + set(UNITTEST_SOURCE_FILES