diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-10-13 14:46:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-13 14:46:28 -0700 |
| commit | cebe05184119cfabcc8f5c0e71c8673c22a1487b (patch) | |
| tree | 4399850d61029f99fd0d36a09deda305e5fa9a90 /ports/assimp | |
| parent | 0a41fb2dfa6b0714da83e00aa3802302c7ec7fb4 (diff) | |
| download | vcpkg-cebe05184119cfabcc8f5c0e71c8673c22a1487b.tar.gz vcpkg-cebe05184119cfabcc8f5c0e71c8673c22a1487b.zip | |
[utfcpp] Use vcpkg_*_cmake and add features (#13521)
Diffstat (limited to 'ports/assimp')
| -rw-r--r-- | ports/assimp/build_fixes.patch | 19 | ||||
| -rw-r--r-- | ports/assimp/irrlicht.patch | 164 |
2 files changed, 91 insertions, 92 deletions
diff --git a/ports/assimp/build_fixes.patch b/ports/assimp/build_fixes.patch index ed7bcfaa3..000a16903 100644 --- a/ports/assimp/build_fixes.patch +++ b/ports/assimp/build_fixes.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index dcafb64..4b131cc 100644 +index dcafb64..453fdff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,6 +130,17 @@ OPTION ( IGNORE_GIT_HASH @@ -9,8 +9,8 @@ index dcafb64..4b131cc 100644 +find_package(Stb REQUIRED) +include_directories(${Stb_INCLUDE_DIR}) +find_package(irrXML CONFIG REQUIRED) -+find_path(UTF8_INCLUDE_DIRS "utf8.h") -+include_directories(${UTF8_INCLUDE_DIRS}) ++find_package(utf8cpp CONFIG REQUIRED) ++link_libraries(utf8cpp) +find_package(RapidJSON CONFIG REQUIRED) +include_directories(${RAPIDJSON_INCLUDE_DIRS}) +find_path(UNZIP_INCLUDE_DIRS "minizip/unzip.h") @@ -31,16 +31,15 @@ index dcafb64..4b131cc 100644 # Grouped compiler settings IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) -@@ -253,7 +262,7 @@ ELSEIF(MSVC) +@@ -253,7 +262,6 @@ ELSEIF(MSVC) IF(MSVC12) ADD_COMPILE_OPTIONS(/wd4351) ENDIF() - SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi") -+# SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi") ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) IF(NOT HUNTER_ENABLED) SET(CMAKE_CXX_FLAGS "-fPIC -std=c++11 ${CMAKE_CXX_FLAGS}") -@@ -352,35 +361,17 @@ IF (NOT TARGET uninstall) +@@ -352,35 +360,17 @@ IF (NOT TARGET uninstall) ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") ENDIF() @@ -80,7 +79,7 @@ index dcafb64..4b131cc 100644 DESTINATION "${CONFIG_INSTALL_DIR}" ) -@@ -389,30 +380,6 @@ IF(HUNTER_ENABLED) +@@ -389,30 +379,6 @@ IF(HUNTER_ENABLED) NAMESPACE "${NAMESPACE}" DESTINATION "${CONFIG_INSTALL_DIR}" ) @@ -111,7 +110,7 @@ index dcafb64..4b131cc 100644 FIND_PACKAGE( DirectX ) -@@ -422,63 +389,19 @@ ENDIF( BUILD_DOCS ) +@@ -422,63 +388,19 @@ ENDIF( BUILD_DOCS ) # Look for system installed irrXML IF ( SYSTEM_IRRXML ) @@ -179,7 +178,7 @@ index dcafb64..4b131cc 100644 IF ( ASSIMP_NO_EXPORT ) ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT) -@@ -633,7 +556,7 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES) +@@ -633,7 +555,7 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES) INCLUDE(DebSourcePPA) ENDIF() @@ -188,7 +187,7 @@ index dcafb64..4b131cc 100644 if (CMAKE_SIZEOF_VOID_P EQUAL 8) SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/") SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/") -@@ -677,4 +600,4 @@ if(WIN32) +@@ -677,4 +599,4 @@ if(WIN32) ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) ENDIF() ENDIF(MSVC12 OR MSVC14 OR MSVC15 ) diff --git a/ports/assimp/irrlicht.patch b/ports/assimp/irrlicht.patch index 02d521dfb..4ae91e06f 100644 --- a/ports/assimp/irrlicht.patch +++ b/ports/assimp/irrlicht.patch @@ -1,82 +1,82 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 2ec072d..3c8b5ab 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -132,7 +132,6 @@ OPTION ( IGNORE_GIT_HASH
-
- find_package(Stb REQUIRED)
- include_directories(${Stb_INCLUDE_DIR})
--find_package(irrXML CONFIG REQUIRED)
- find_path(UTF8_INCLUDE_DIRS "utf8.h")
- include_directories(${UTF8_INCLUDE_DIRS})
- find_package(RapidJSON CONFIG REQUIRED)
-@@ -389,7 +388,7 @@ ENDIF( BUILD_DOCS )
-
- # Look for system installed irrXML
- IF ( SYSTEM_IRRXML )
-- FIND_PACKAGE( irrXML REQUIRED )
-+ FIND_PACKAGE( irrlicht CONFIG REQUIRED )
- ENDIF( SYSTEM_IRRXML )
-
- # Search for external dependencies, and build them from source if not found
-diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt
-index 17fcea7..f08f59f 100644
---- a/code/CMakeLists.txt
-+++ b/code/CMakeLists.txt
-@@ -862,7 +862,7 @@ SET( Extra_SRCS
- SOURCE_GROUP( Extra FILES ${Extra_SRCS})
-
- # irrXML
-- find_package(irrXML CONFIG REQUIRED)
-+ find_package(irrlicht CONFIG REQUIRED)
-
- # polyclipping
- find_package(polyclipping CONFIG REQUIRED)
-@@ -1033,7 +1033,7 @@ TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC
-
- TARGET_LINK_LIBRARIES(assimp
- polyclipping::polyclipping
-- irrXML::irrXML
-+ Irrlicht
- minizip::minizip
- ZLIB::ZLIB
- kubazip::kubazip
-diff --git a/code/X3D/FIReader.cpp b/code/X3D/FIReader.cpp
-index 31d9aba..2c96052 100644
---- a/code/X3D/FIReader.cpp
-+++ b/code/X3D/FIReader.cpp
-@@ -654,8 +654,8 @@ public:
- return currentNodeType;
- }
-
-- virtual int getAttributeCount() const /*override*/ {
-- return static_cast<int>(attributes.size());
-+ virtual unsigned int getAttributeCount() const /*override*/ {
-+ return static_cast<unsigned int>(attributes.size());
- }
-
- virtual const char* getAttributeName(int idx) const /*override*/ {
-@@ -1733,7 +1733,7 @@ public:
- return reader->getNodeType();
- }
-
-- virtual int getAttributeCount() const /*override*/ {
-+ virtual unsigned int getAttributeCount() const /*override*/ {
- return reader->getAttributeCount();
- }
-
-diff --git a/include/assimp/irrXMLWrapper.h b/include/assimp/irrXMLWrapper.h
-index 77cfd5e..ba584a0 100644
---- a/include/assimp/irrXMLWrapper.h
-+++ b/include/assimp/irrXMLWrapper.h
-@@ -133,8 +133,8 @@ public:
-
- // ----------------------------------------------------------------------------------
- //! Returns size of file in bytes
-- virtual int getSize() {
-- return (int)data.size();
-+ virtual long getSize() const override {
-+ return (long)data.size();
- }
-
- private:
+diff --git a/CMakeLists.txt b/CMakeLists.txt +index 453fdff..3a02956 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -132,7 +132,6 @@ OPTION ( IGNORE_GIT_HASH + + find_package(Stb REQUIRED) + include_directories(${Stb_INCLUDE_DIR}) +-find_package(irrXML CONFIG REQUIRED) + find_package(utf8cpp CONFIG REQUIRED) + link_libraries(utf8cpp) + find_package(RapidJSON CONFIG REQUIRED) +@@ -388,7 +387,7 @@ ENDIF( BUILD_DOCS ) + + # Look for system installed irrXML + IF ( SYSTEM_IRRXML ) +- FIND_PACKAGE( irrXML REQUIRED ) ++ FIND_PACKAGE( irrlicht CONFIG REQUIRED ) + ENDIF( SYSTEM_IRRXML ) + + # Search for external dependencies, and build them from source if not found +diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt +index f5553e5..5cffa0c 100644 +--- a/code/CMakeLists.txt ++++ b/code/CMakeLists.txt +@@ -862,7 +862,7 @@ SET( Extra_SRCS + SOURCE_GROUP( Extra FILES ${Extra_SRCS}) + + # irrXML +- find_package(irrXML CONFIG REQUIRED) ++ find_package(irrlicht CONFIG REQUIRED) + + # polyclipping + find_package(polyclipping CONFIG REQUIRED) +@@ -1033,7 +1033,7 @@ TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC + + TARGET_LINK_LIBRARIES(assimp + polyclipping::polyclipping +- irrXML::irrXML ++ Irrlicht + minizip::minizip + ZLIB::ZLIB + kubazip::kubazip +diff --git a/code/X3D/FIReader.cpp b/code/X3D/FIReader.cpp +index 525a084..0cbca48 100644 +--- a/code/X3D/FIReader.cpp ++++ b/code/X3D/FIReader.cpp +@@ -654,8 +654,8 @@ public: + return currentNodeType; + } + +- virtual int getAttributeCount() const /*override*/ { +- return static_cast<int>(attributes.size()); ++ virtual unsigned int getAttributeCount() const /*override*/ { ++ return static_cast<unsigned int>(attributes.size()); + } + + virtual const char* getAttributeName(int idx) const /*override*/ { +@@ -1733,7 +1733,7 @@ public: + return reader->getNodeType(); + } + +- virtual int getAttributeCount() const /*override*/ { ++ virtual unsigned int getAttributeCount() const /*override*/ { + return reader->getAttributeCount(); + } + +diff --git a/include/assimp/irrXMLWrapper.h b/include/assimp/irrXMLWrapper.h +index 77cfd5e..ba584a0 100644 +--- a/include/assimp/irrXMLWrapper.h ++++ b/include/assimp/irrXMLWrapper.h +@@ -133,8 +133,8 @@ public: + + // ---------------------------------------------------------------------------------- + //! Returns size of file in bytes +- virtual int getSize() { +- return (int)data.size(); ++ virtual long getSize() const override { ++ return (long)data.size(); + } + + private: |
