mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 23:21:50 +08:00
[assimp] Update to version 5.2.5 (#26856)
This commit is contained in:
parent
cf48528dff
commit
744a921348
@ -1,81 +0,0 @@
|
||||
From affa85a36bbd329c8792b553f64188c1d3a58188 Mon Sep 17 00:00:00 2001
|
||||
From: hgdagon <hgdagon@gmail.com>
|
||||
Date: Wed, 25 May 2022 07:59:01 -0700
|
||||
Subject: [PATCH 1/2] Fix GNUC check on Windows
|
||||
|
||||
---
|
||||
code/Common/DefaultIOStream.cpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/code/Common/DefaultIOStream.cpp b/code/Common/DefaultIOStream.cpp
|
||||
index 17fc44f9a2..bbc3b2080f 100644
|
||||
--- a/code/Common/DefaultIOStream.cpp
|
||||
+++ b/code/Common/DefaultIOStream.cpp
|
||||
@@ -63,7 +63,7 @@ inline int select_fseek(FILE *file, int64_t offset, int origin) {
|
||||
|
||||
|
||||
|
||||
-#if defined _WIN64 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
+#if defined _WIN32 && !defined __GNUC__ && __MSVCRT_VERSION__ >= 0x0601
|
||||
template <>
|
||||
inline size_t select_ftell<8>(FILE *file) {
|
||||
return (size_t)::_ftelli64(file);
|
||||
@@ -74,7 +74,7 @@ inline int select_fseek<8>(FILE *file, int64_t offset, int origin) {
|
||||
return ::_fseeki64(file, offset, origin);
|
||||
}
|
||||
|
||||
-#endif // #if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
+#endif // #if defined _WIN32 && !defined __GNUC__ && __MSVCRT_VERSION__ >= 0x0601
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -149,7 +149,7 @@ size_t DefaultIOStream::FileSize() const {
|
||||
//
|
||||
// See here for details:
|
||||
// https://www.securecoding.cert.org/confluence/display/seccode/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file
|
||||
-#if defined _WIN64 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
+#if defined _WIN32 && !defined __GNUC__ && __MSVCRT_VERSION__ >= 0x0601
|
||||
struct __stat64 fileStat;
|
||||
//using fileno + fstat avoids having to handle the filename
|
||||
int err = _fstat64(_fileno(mFile), &fileStat);
|
||||
|
||||
From efbcdccac99a66d513731a2f5af65211c734cfe7 Mon Sep 17 00:00:00 2001
|
||||
From: hgdagon <hgdagon@gmail.com>
|
||||
Date: Wed, 25 May 2022 09:18:42 -0700
|
||||
Subject: [PATCH 2/2] Fix GNUC check on Windows (2nd attempt)
|
||||
|
||||
---
|
||||
code/Common/DefaultIOStream.cpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/code/Common/DefaultIOStream.cpp b/code/Common/DefaultIOStream.cpp
|
||||
index bbc3b2080f..d5d5846897 100644
|
||||
--- a/code/Common/DefaultIOStream.cpp
|
||||
+++ b/code/Common/DefaultIOStream.cpp
|
||||
@@ -63,7 +63,7 @@ inline int select_fseek(FILE *file, int64_t offset, int origin) {
|
||||
|
||||
|
||||
|
||||
-#if defined _WIN32 && !defined __GNUC__ && __MSVCRT_VERSION__ >= 0x0601
|
||||
+#if defined _WIN32 && (!defined __GNUC__ || !defined __CLANG__ && __MSVCRT_VERSION__ >= 0x0601)
|
||||
template <>
|
||||
inline size_t select_ftell<8>(FILE *file) {
|
||||
return (size_t)::_ftelli64(file);
|
||||
@@ -74,7 +74,7 @@ inline int select_fseek<8>(FILE *file, int64_t offset, int origin) {
|
||||
return ::_fseeki64(file, offset, origin);
|
||||
}
|
||||
|
||||
-#endif // #if defined _WIN32 && !defined __GNUC__ && __MSVCRT_VERSION__ >= 0x0601
|
||||
+#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -149,7 +149,7 @@ size_t DefaultIOStream::FileSize() const {
|
||||
//
|
||||
// See here for details:
|
||||
// https://www.securecoding.cert.org/confluence/display/seccode/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file
|
||||
-#if defined _WIN32 && !defined __GNUC__ && __MSVCRT_VERSION__ >= 0x0601
|
||||
+#if defined _WIN32 && (!defined __GNUC__ || !defined __CLANG__ && __MSVCRT_VERSION__ >= 0x0601)
|
||||
struct __stat64 fileStat;
|
||||
//using fileno + fstat avoids having to handle the filename
|
||||
int err = _fstat64(_fileno(mFile), &fileStat);
|
@ -1,13 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2aa6642..e74f93c 100644
|
||||
index 458a328..b8c2fc6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -56,7 +56,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
||||
add_definitions(-DASSIMP_USE_HUNTER)
|
||||
ENDIF()
|
||||
|
||||
-PROJECT(Assimp VERSION 5.2.0)
|
||||
+PROJECT(Assimp VERSION 5.2.4)
|
||||
-PROJECT(Assimp VERSION 5.2.4)
|
||||
+PROJECT(Assimp VERSION 5.2.5)
|
||||
|
||||
# All supported options ###############################################
|
||||
|
||||
@ -16,10 +16,10 @@ index 2aa6642..e74f93c 100644
|
||||
# enable multi-core compilation with MSVC
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
|
||||
- ADD_COMPILE_OPTIONS(/bigobj /W4 /WX )
|
||||
+ ADD_COMPILE_OPTIONS(/bigobj)
|
||||
+ ADD_COMPILE_OPTIONS(/bigobj )
|
||||
ELSE() # msvc
|
||||
- ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX)
|
||||
+ ADD_COMPILE_OPTIONS(/MP /bigobj)
|
||||
+ ADD_COMPILE_OPTIONS(/MP /bigobj )
|
||||
ENDIF()
|
||||
# disable "elements of array '' will be default initialized" warning on MSVC2013
|
||||
IF(MSVC12)
|
||||
@ -29,13 +29,13 @@ index 2aa6642..e74f93c 100644
|
||||
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
|
||||
- SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
- SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")
|
||||
+ #SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
|
||||
+ #SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
+ #SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")
|
||||
+ # SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
|
||||
+ # SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||
+ # SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")
|
||||
ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
IF(NOT ASSIMP_HUNTER_ENABLED)
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
@@ -414,7 +414,7 @@ ENDIF()
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
@@ -418,7 +418,7 @@ ENDIF()
|
||||
|
||||
set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
|
||||
|
||||
@ -44,7 +44,7 @@ index 2aa6642..e74f93c 100644
|
||||
set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}")
|
||||
set(CMAKE_CONFIG_TEMPLATE_FILE "cmake-modules/assimp-hunter-config.cmake.in")
|
||||
set(NAMESPACE "${PROJECT_NAME}::")
|
||||
@@ -422,7 +422,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
||||
@@ -426,7 +426,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
||||
set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake")
|
||||
set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake")
|
||||
ELSE()
|
||||
@ -53,7 +53,7 @@ index 2aa6642..e74f93c 100644
|
||||
set(CMAKE_CONFIG_TEMPLATE_FILE "cmake-modules/assimp-plain-config.cmake.in")
|
||||
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE)
|
||||
set(NAMESPACE "${PROJECT_NAME_LOWERCASE}::")
|
||||
@@ -464,14 +464,14 @@ ENDIF()
|
||||
@@ -468,14 +468,14 @@ ENDIF()
|
||||
|
||||
# Search for external dependencies, and build them from source if not found
|
||||
# Search for zlib
|
||||
@ -61,7 +61,7 @@ index 2aa6642..e74f93c 100644
|
||||
- hunter_add_package(ZLIB)
|
||||
- find_package(ZLIB CONFIG REQUIRED)
|
||||
+IF(1)
|
||||
+ #hunter_add_package(ZLIB)
|
||||
+ # hunter_add_package(ZLIB)
|
||||
+ find_package(ZLIB REQUIRED)
|
||||
|
||||
add_definitions(-DASSIMP_BUILD_NO_OWN_ZLIB)
|
||||
@ -73,7 +73,7 @@ index 2aa6642..e74f93c 100644
|
||||
ELSE()
|
||||
# If the zlib is already found outside, add an export in case assimpTargets can't find it.
|
||||
IF( ZLIB_FOUND )
|
||||
@@ -512,12 +512,12 @@ ELSE()
|
||||
@@ -516,12 +516,12 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
IF( NOT IOS )
|
||||
@ -468,19 +468,19 @@ index 5339454..45e07c0 100644
|
||||
ENDIF ()
|
||||
|
||||
|
||||
diff --git a/code/Common/Assimp.cpp b/code/Common/Assimp.cpp
|
||||
index 71e312c..fa7fc36 100644
|
||||
--- a/code/Common/Assimp.cpp
|
||||
+++ b/code/Common/Assimp.cpp
|
||||
@@ -1290,7 +1290,7 @@ ASSIMP_API void aiQuaternionInterpolate(
|
||||
# endif
|
||||
diff --git a/code/Common/StbCommon.h b/code/Common/StbCommon.h
|
||||
index 1265d25..18f4564 100644
|
||||
--- a/code/Common/StbCommon.h
|
||||
+++ b/code/Common/StbCommon.h
|
||||
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
# define STB_IMAGE_IMPLEMENTATION
|
||||
-# include "stb/stb_image.h"
|
||||
+# include <stb_image.h>
|
||||
-#include "stb/stb_image.h"
|
||||
+#include <stb_image.h>
|
||||
|
||||
# if _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#if _MSC_VER
|
||||
#pragma warning(pop)
|
||||
diff --git a/code/Common/BaseImporter.cpp b/code/Common/BaseImporter.cpp
|
||||
index 383300e..03fdd9a 100644
|
||||
--- a/code/Common/BaseImporter.cpp
|
||||
@ -495,7 +495,7 @@ index 383300e..03fdd9a 100644
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
diff --git a/code/Common/ZipArchiveIOSystem.cpp b/code/Common/ZipArchiveIOSystem.cpp
|
||||
index e0c9883..78b522a 100644
|
||||
index 3d5c72e..770cb9d 100644
|
||||
--- a/code/Common/ZipArchiveIOSystem.cpp
|
||||
+++ b/code/Common/ZipArchiveIOSystem.cpp
|
||||
@@ -54,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@ -507,26 +507,3 @@ index e0c9883..78b522a 100644
|
||||
#endif
|
||||
|
||||
namespace Assimp {
|
||||
@@ -196,7 +196,9 @@ zlib_filefunc_def IOSystem2Unzip::get(IOSystem *pIOHandler) {
|
||||
zlib_filefunc_def mapping;
|
||||
|
||||
mapping.zopen_file = (open_file_func)open;
|
||||
+#ifdef ZOPENDISK64
|
||||
mapping.zopendisk_file = (opendisk_file_func)opendisk;
|
||||
+#endif
|
||||
mapping.zread_file = (read_file_func)read;
|
||||
mapping.zwrite_file = (write_file_func)write;
|
||||
mapping.ztell_file = (tell_file_func)tell;
|
||||
diff --git a/code/Pbrt/PbrtExporter.cpp b/code/Pbrt/PbrtExporter.cpp
|
||||
index 9590c49..e23b9b1 100644
|
||||
--- a/code/Pbrt/PbrtExporter.cpp
|
||||
+++ b/code/Pbrt/PbrtExporter.cpp
|
||||
@@ -83,7 +83,7 @@ Other:
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
-#include "stb/stb_image.h"
|
||||
+#include <stb_image.h>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO assimp/assimp
|
||||
REF v5.2.4
|
||||
SHA512 ee988b1806b46c78f97bb5b25237a3f56a7028ed37898fb9b243e379e29e8bfd29e4dffc616566941ed9bdcf502bd30568904ad2ef2ef7d0f63b40daefdc66bf
|
||||
REF v5.2.5
|
||||
SHA512 ac0dc4243f9d1ff077966f0037187b4374075ac97e75e1a3cd6bdc1caf5f8e4d40953d9a8a316480969c09524d87daa9d3ed75e6ac6f037dd5b1c5f25fce3afb
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
build_fixes.patch
|
||||
4542.patch # https://github.com/assimp/assimp/pull/4542
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/cmake-modules/FindZLIB.cmake")
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "assimp",
|
||||
"version": "5.2.4",
|
||||
"version": "5.2.5",
|
||||
"description": "The Open Asset import library",
|
||||
"homepage": "https://github.com/assimp/assimp",
|
||||
"license": "BSD-3-Clause",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "bdd963b2ef327bf5e8533689aff4707226e22851",
|
||||
"version": "5.2.5",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "28eaf490bb2eaaf52c344b8e8dc16d4619cb863e",
|
||||
"version": "5.2.4",
|
||||
|
@ -209,7 +209,7 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"assimp": {
|
||||
"baseline": "5.2.4",
|
||||
"baseline": "5.2.5",
|
||||
"port-version": 0
|
||||
},
|
||||
"asynch": {
|
||||
|
Loading…
Reference in New Issue
Block a user