From 0cdc75ccd28c607677c302014cd40df542d85d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastia=CC=81n=20Barschkis?= Date: Fri, 17 Jul 2020 15:58:13 +0200 Subject: Fluid: Cleanup build system for extern mantaflow No longer including unused dependencies. Should numpy IO be needed at some point, the Manta source update script can be configured so that the required dependencies are included again. --- extern/mantaflow/preprocessed/fileio/ioutil.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'extern/mantaflow/preprocessed/fileio/ioutil.cpp') diff --git a/extern/mantaflow/preprocessed/fileio/ioutil.cpp b/extern/mantaflow/preprocessed/fileio/ioutil.cpp index cc63cf87ac1..cf40d71fcc4 100644 --- a/extern/mantaflow/preprocessed/fileio/ioutil.cpp +++ b/extern/mantaflow/preprocessed/fileio/ioutil.cpp @@ -26,17 +26,18 @@ extern "C" { # include } +#endif -# if defined(WIN32) || defined(_WIN32) -# include -# include -# endif +#if defined(WIN32) || defined(_WIN32) +# include +# include +#endif using namespace std; namespace Manta { -# if defined(WIN32) || defined(_WIN32) +#if defined(WIN32) || defined(_WIN32) static wstring stringToWstring(const char *str) { const int length_wc = MultiByteToWideChar(CP_UTF8, 0, str, strlen(str), NULL, 0); @@ -44,10 +45,11 @@ static wstring stringToWstring(const char *str) MultiByteToWideChar(CP_UTF8, 0, str, strlen(str), &strWide[0], length_wc); return strWide; } -# endif // WIN32==1 +#endif // WIN32==1 void *safeGzopen(const char *filename, const char *mode) { +#if NO_ZLIB != 1 gzFile gzfile; # if defined(WIN32) || defined(_WIN32) @@ -58,8 +60,11 @@ void *safeGzopen(const char *filename, const char *mode) # endif return gzfile; -} +#else + debMsg("safeGzopen not supported without zlib", 1); + return nullptr; #endif // NO_ZLIB != 1 +} #if defined(OPENVDB) // Convert from OpenVDB value to Manta value. @@ -109,4 +114,4 @@ template<> void convertTo(openvdb::Vec3s *out, Vec3 &in) } #endif // OPENVDB==1 -} // namespace +} // namespace Manta -- cgit v1.2.3