aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-07-19 20:00:23 -0700
committerGitHub <noreply@github.com>2017-07-19 20:00:23 -0700
commitc8e26828e41ca1032dc4d6cb6660d4a5ca588d4c (patch)
tree9325b9e54d36e78d2557744de98c145286eebc2b
parent99905acd5386ef4f14fc6e03d778ac54c60ca1e3 (diff)
parent4c7f0d0c59083c207b6f3d1bb4528b822f83e126 (diff)
downloadvcpkg-c8e26828e41ca1032dc4d6cb6660d4a5ca588d4c.tar.gz
vcpkg-c8e26828e41ca1032dc4d6cb6660d4a5ca588d4c.zip
Merge pull request #1494 from jasjuang/master
upgrade assimp to 4.0.0, fix cmake error for down stream project
-rw-r--r--ports/assimp/CONTROL2
-rw-r--r--ports/assimp/portfile.cmake39
2 files changed, 21 insertions, 20 deletions
diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL
index 2c4736563..2e2b88692 100644
--- a/ports/assimp/CONTROL
+++ b/ports/assimp/CONTROL
@@ -1,4 +1,4 @@
Source: assimp
-Version: 3.3.1
+Version: 4.0.0
Description: The Open Asset import library
Build-Depends: zlib
diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake
index 452233265..0da9cc2a8 100644
--- a/ports/assimp/portfile.cmake
+++ b/ports/assimp/portfile.cmake
@@ -1,19 +1,12 @@
-# Common Ambient Variables:
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# TARGET_TRIPLET is the current triplet (x86-windows, etc)
-# PORT is the current port name (zlib, etc)
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-#
-
include(vcpkg_common_functions)
-SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/assimp/assimp/archive/v3.3.1.zip"
- FILENAME "assimp-3.3.1.zip"
- SHA512 d8488702989629a80297b9aea1f91fd5f3d0736f91cc5d7991a41ade99a445e9897c752fbedb2829350fabb5439d4ea31d34bbedb771b3e66aef23cd40b02122
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO assimp/assimp
+ REF v4.0.0
+ SHA512 ab2b376c6323fc8579fe3a4b3dbe92c44d753747464a14d6e2be70d2a855c208df882ad84487a7b96f364afb175938b5f6a1111d767450b01e0b8b7f0f36ba62
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@@ -21,20 +14,28 @@ vcpkg_configure_cmake(
-DASSIMP_BUILD_ASSIMP_VIEW=False
-DASSIMP_BUILD_ZLIB=False
-DASSIMP_BUILD_ASSIMP_TOOLS=False
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.0")
+
+vcpkg_copy_pdbs()
+
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
-file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/assimp-3.3 ${CURRENT_PACKAGES_DIR}/share/assimp)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG)
+string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)"
+ "set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+string(REPLACE "assimp\${ASSIMP_LIBRARY_SUFFIX}"
+ "assimp\${ASSIMP_LIBRARY_SUFFIX}.lib" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
+ "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES})" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+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)
-
-vcpkg_copy_pdbs() \ No newline at end of file