From 59c8b4ed84d4d8bd4897e1c2c36556b7c7d68320 Mon Sep 17 00:00:00 2001 From: Rahul Sheth Date: Thu, 27 Aug 2020 11:25:29 -0400 Subject: [PATCH] Move RapidJSON definitions to CMake --- CMakeLists.txt | 4 ++-- code/AssetLib/glTF/glTFAsset.h | 8 -------- code/AssetLib/glTF/glTFCommon.h | 2 -- code/AssetLib/glTF2/glTF2Asset.h | 8 -------- code/CMakeLists.txt | 2 ++ 5 files changed, 4 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e21ee8e4..936f83421 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,8 +45,8 @@ option(ASSIMP_HUNTER_ENABLED "Enable Hunter package manager support" OFF) IF(ASSIMP_HUNTER_ENABLED) include("cmake/HunterGate.cmake") HunterGate( - URL "https://github.com/cpp-pm/hunter/archive/v0.23.261.tar.gz" - SHA1 "1540dad7b97c849784a09e8c452ba811c9f71ba2" + URL "https://github.com/cpp-pm/hunter/archive/v0.23.268.tar.gz" + SHA1 "40ae51ce014380289bad5ec6b6e207660f69e804" ) add_definitions(-DASSIMP_USE_HUNTER) diff --git a/code/AssetLib/glTF/glTFAsset.h b/code/AssetLib/glTF/glTFAsset.h index 15947c8c6..189cf1da8 100644 --- a/code/AssetLib/glTF/glTFAsset.h +++ b/code/AssetLib/glTF/glTFAsset.h @@ -60,19 +60,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#ifndef RAPIDJSON_HAS_STDSTRING -#define RAPIDJSON_HAS_STDSTRING 1 -#endif - #if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wclass-memaccess" #endif -#ifndef RAPIDJSON_NOMEMBERITERATORCLASS -#define RAPIDJSON_NOMEMBERITERATORCLASS -#endif - #include #include #include diff --git a/code/AssetLib/glTF/glTFCommon.h b/code/AssetLib/glTF/glTFCommon.h index f70780ed4..977fc0da4 100644 --- a/code/AssetLib/glTF/glTFCommon.h +++ b/code/AssetLib/glTF/glTFCommon.h @@ -52,8 +52,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#define RAPIDJSON_HAS_STDSTRING 1 -#define RAPIDJSON_NOMEMBERITERATORCLASS #include #include #include diff --git a/code/AssetLib/glTF2/glTF2Asset.h b/code/AssetLib/glTF2/glTF2Asset.h index 763a6ac37..67c066219 100644 --- a/code/AssetLib/glTF2/glTF2Asset.h +++ b/code/AssetLib/glTF2/glTF2Asset.h @@ -62,19 +62,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#ifndef RAPIDJSON_HAS_STDSTRING -#define RAPIDJSON_HAS_STDSTRING 1 -#endif - #if (__GNUC__ == 8 && __GNUC_MINOR__ >= 0) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wclass-memaccess" #endif -#ifndef RAPIDJSON_NOMEMBERITERATORCLASS -#define RAPIDJSON_NOMEMBERITERATORCLASS -#endif - #include #include #include diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 9fafa4944..a727736df 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1054,6 +1054,8 @@ IF(ASSIMP_HUNTER_ENABLED) ELSE() INCLUDE_DIRECTORIES( "../contrib/rapidjson/include" ) INCLUDE_DIRECTORIES( "../contrib" ) + ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1 ) + ADD_DEFINITIONS( -DRAPIDJSON_NOMEMBERITERATORCLASS ) ENDIF() # VC2010 fixes