aboutsummaryrefslogtreecommitdiff
path: root/ports/assimp
diff options
context:
space:
mode:
authorPhoebe <20694052+PhoebeHui@users.noreply.github.com>2019-11-26 07:54:49 +0800
committerGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-11-25 15:54:49 -0800
commit73c3e33c4a9bf2bc2b67bb172b72730e707344e3 (patch)
tree8254f2c5e9b2c96e009e84d292a1b4d67859ba88 /ports/assimp
parentca1e2ec6b30a0a3830fca950a9dd0b55202fd1ec (diff)
downloadvcpkg-73c3e33c4a9bf2bc2b67bb172b72730e707344e3.tar.gz
vcpkg-73c3e33c4a9bf2bc2b67bb172b72730e707344e3.zip
[minizip assimp] export minizip cmake targets and fix minizip dependency in assimp (#9075)
* [minizip assimp] export minizip cmake targets and fix minizip dependency in assimp * Update CMakeList.txt * Update obsolete functions
Diffstat (limited to 'ports/assimp')
-rw-r--r--ports/assimp/CONTROL4
-rw-r--r--ports/assimp/fix_minizip.patch32
-rw-r--r--ports/assimp/portfile.cmake7
3 files changed, 36 insertions, 7 deletions
diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL
index ba4a89980..2e58fd6af 100644
--- a/ports/assimp/CONTROL
+++ b/ports/assimp/CONTROL
@@ -1,5 +1,5 @@
Source: assimp
-Version: 5.0.0-1
+Version: 5.0.0-2
Homepage: https://github.com/assimp/assimp
Description: The Open Asset import library
-Build-Depends: zlib, rapidjson
+Build-Depends: zlib, rapidjson, minizip
diff --git a/ports/assimp/fix_minizip.patch b/ports/assimp/fix_minizip.patch
new file mode 100644
index 000000000..a0207ebe6
--- /dev/null
+++ b/ports/assimp/fix_minizip.patch
@@ -0,0 +1,32 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6c3d03e..4cb6927 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -470,12 +470,12 @@ ENDIF(HUNTER_ENABLED)
+
+ IF( NOT IOS )
+ IF( NOT ASSIMP_BUILD_MINIZIP )
+- use_pkgconfig(UNZIP minizip)
++ find_package(minizip CONFIG REQUIRED)
+ ENDIF( NOT ASSIMP_BUILD_MINIZIP )
+ ELSE ( NOT IOS )
+ IF( NOT BUILD_SHARED_LIBS )
+ IF( NOT ASSIMP_BUILD_MINIZIP )
+- use_pkgconfig(UNZIP minizip)
++ find_package(minizip CONFIG REQUIRED)
+ ENDIF( NOT ASSIMP_BUILD_MINIZIP )
+ ENDIF ( NOT BUILD_SHARED_LIBS )
+ ENDIF ( NOT IOS )
+diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt
+index 55538d9..30568ff 100644
+--- a/code/CMakeLists.txt
++++ b/code/CMakeLists.txt
+@@ -1125,7 +1125,7 @@ IF(HUNTER_ENABLED)
+ zip::zip
+ )
+ ELSE(HUNTER_ENABLED)
+- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} )
++ TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} minizip::minizip)
+ ENDIF(HUNTER_ENABLED)
+
+ if(ASSIMP_ANDROID_JNIIOSYSTEM)
diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake
index 07c0534e8..99ef185bd 100644
--- a/ports/assimp/portfile.cmake
+++ b/ports/assimp/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO assimp/assimp
@@ -10,6 +8,7 @@ vcpkg_from_github(
uninitialized-variable.patch
fix-static-build-error.patch
cmake-policy.patch
+ fix_minizip.patch
)
file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake)
@@ -67,6 +66,4 @@ endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake "${ASSIMP_CONFIG}")
-# Handle copyright
-file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/assimp/LICENSE ${CURRENT_PACKAGES_DIR}/share/assimp/copyright)
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file