From 64e77a615d679c60803d55b5c7e2cf7214243e21 Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Mon, 20 Apr 2020 22:12:32 +0900 Subject: [PATCH] Fix compilation with VS2017 Enable OpenSubdiv by default for VS2019(CMakeSettings.json) --- CMakeSettings.json | 5 +++++ README.md | 4 +++- src/tinyusdz.cc | 1 + vcsetup-2017.bat | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 vcsetup-2017.bat diff --git a/CMakeSettings.json b/CMakeSettings.json index ff1f50ab..85720a60 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -15,6 +15,11 @@ "name": "TINYUSDZ_USE_CCACHE", "value": "False", "type": "BOOL" + }, + { + "name": "TINYUSDZ_WITH_OPENSUBDIV", + "value": "True", + "type": "BOOL" } ] }, diff --git a/README.md b/README.md index 50a17915..5753e606 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,9 @@ Recomended way is simply copy `src` and `include` folder to your app, and add `* ### CMake -cmake build is still provided for CI build. Cmake project is not recommended for embedding TinyUSDZ to your app. +cmake build is still provided for CI build. `CMakeSettings.json` is provided for Visual Studio 2019. + +Cmake project is not recommended for embedding TinyUSDZ to your app. ``` $ mkdir build diff --git a/src/tinyusdz.cc b/src/tinyusdz.cc index 39ed62d6..84da86c3 100644 --- a/src/tinyusdz.cc +++ b/src/tinyusdz.cc @@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include // std::tolower #include #include #include diff --git a/vcsetup-2017.bat b/vcsetup-2017.bat new file mode 100644 index 00000000..e19a6747 --- /dev/null +++ b/vcsetup-2017.bat @@ -0,0 +1,4 @@ +rmdir /s /q build +mkdir build + +cmake -G "Visual Studio 15 2017" -A x64 -Bbuild -H.