diff --git a/third_party/meshoptimizer/src/vertexcodec.cpp b/third_party/meshoptimizer/src/vertexcodec.cpp index a16e2b640f..8e5d96876c 100644 --- a/third_party/meshoptimizer/src/vertexcodec.cpp +++ b/third_party/meshoptimizer/src/vertexcodec.cpp @@ -12,7 +12,7 @@ #define SIMD_SSE #endif -#if !defined(SIMD_SSE) && defined(WIN32) && (defined(_M_IX86) || defined(_M_X64)) +#if !defined(SIMD_SSE) && defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) #define SIMD_SSE #define SIMD_FALLBACK #include diff --git a/third_party/meshoptimizer/tnt/README b/third_party/meshoptimizer/tnt/README index 8d2f27ea73..b8cc754b34 100644 --- a/third_party/meshoptimizer/tnt/README +++ b/third_party/meshoptimizer/tnt/README @@ -8,12 +8,15 @@ This folder was created as follows: rm -rf demo tools mv LICENSE.md LICENSE -Also removed lines 11 - 24 vertexcodec.cpp to disable SSE, which caused build -issues with windows. +Also added this to the CMakeLists.txt: + + if(CLANG_CL) + # Clang for Windows needs an additional flag for SSSE3 instructions. + target_compile_options(meshoptimizer PRIVATE -mssse3) + endif() To update the library, you can do this: curl -L -O https://github.com/zeux/meshoptimizer/archive/master.zip unzip master.zip cp -r meshoptimizer-master/src/ meshoptimizer/src/ - in vertexcodec.cpp, replace _MSC_VER with WIN32