Initial support of building tinyusdz on MSVC.

This commit is contained in:
Syoyo Fujita
2020-04-11 00:04:29 +09:00
parent 6a1865c19d
commit 3325e8eecc
3 changed files with 47 additions and 0 deletions

34
CMakeSettings.json Normal file
View File

@@ -0,0 +1,34 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [
{
"name": "TINYUSDZ_USE_CCACHE",
"value": "False",
"type": "BOOL"
}
]
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
}

View File

@@ -1,8 +1,17 @@
#ifdef _MSC_VER
#ifndef NOMINMAX
#define NOMINMAX
#endif
#endif
#include "lz4-compression.hh"
#include <cstring>
#include <cstdlib>
#include <memory>
#include <algorithm>
// LZ4Compression based on USD's TfFastCompression class

4
vcsetup-2019.bat Normal file
View File

@@ -0,0 +1,4 @@
rmdir /s /q build
mkdir build
cmake -G "Visual Studio 16 2019" -A x64 -Bbuild -H.