diff --git a/CMakeLists.txt b/CMakeLists.txt index 091ab2d3f..405f0b4e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -288,12 +288,11 @@ ELSEIF( CMAKE_COMPILER_IS_MINGW ) message(WARNING "MinGW is old, if you experience errors, update MinGW.") ENDIF() IF(NOT ASSIMP_HUNTER_ENABLED) - SET(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") + SET(CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}") SET(CMAKE_C_FLAGS "-fPIC ${CMAKE_C_FLAGS}") ENDIF() SET(CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long -Wa,-mbig-obj -O3 ${CMAKE_CXX_FLAGS}") SET(CMAKE_C_FLAGS "-fno-strict-aliasing ${CMAKE_C_FLAGS}") - ADD_DEFINITIONS( -U__STRICT_ANSI__ ) ENDIF() IF ( IOS AND NOT ASSIMP_HUNTER_ENABLED) diff --git a/code/AssetLib/glTF2/glTF2Asset.inl b/code/AssetLib/glTF2/glTF2Asset.inl index b570fc8e6..e0a505297 100644 --- a/code/AssetLib/glTF2/glTF2Asset.inl +++ b/code/AssetLib/glTF2/glTF2Asset.inl @@ -863,6 +863,9 @@ inline void Accessor::Read(Value &obj, Asset &r) { //indices componentType sparse->indicesType = MemberOrDefault(*indicesValue, "componentType", ComponentType_BYTE); //sparse->indices->Read(*indicesValue, r); + } else { + // indicesType + sparse->indicesType = MemberOrDefault(*sparseValue, "componentType", ComponentType_UNSIGNED_SHORT); } // value @@ -875,8 +878,6 @@ inline void Accessor::Read(Value &obj, Asset &r) { //sparse->values->Read(*valuesValue, r); } - // indicesType - sparse->indicesType = MemberOrDefault(*sparseValue, "componentType", ComponentType_UNSIGNED_SHORT); const unsigned int elementSize = GetElementSize(); const size_t dataSize = count * elementSize; diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 364b2d70b..e45bf8a2a 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1262,6 +1262,12 @@ SET_TARGET_PROPERTIES( assimp PROPERTIES OUTPUT_NAME assimp${LIBRARY_SUFFIX} ) +if (WIN32 AND CMAKE_COMPILER_IS_GNUCXX AND BUILD_SHARED_LIBS) + set_target_properties(assimp PROPERTIES + SUFFIX "-${ASSIMP_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}" + ) +endif() + if (APPLE) if (ASSIMP_BUILD_FRAMEWORK) SET_TARGET_PROPERTIES( assimp PROPERTIES