From 529b3f82f8fda1f8a41d09d1e8d3295d47474a04 Mon Sep 17 00:00:00 2001 From: charlie barto Date: Wed, 5 Oct 2016 19:00:17 -0400 Subject: [PATCH 1/2] added assimp --- ports/assimp/CONTROL | 4 ++++ ports/assimp/portfile.cmake | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 ports/assimp/CONTROL create mode 100644 ports/assimp/portfile.cmake diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL new file mode 100644 index 00000000000..7089686b60d --- /dev/null +++ b/ports/assimp/CONTROL @@ -0,0 +1,4 @@ +Source: assimp +Version: 3.2.1 +Description: The Open Asset import library +Build-Depends: zlib diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake new file mode 100644 index 00000000000..dd57392be4c --- /dev/null +++ b/ports/assimp/portfile.cmake @@ -0,0 +1,39 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# 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(${CMAKE_TRIPLET_FILE}) +include(vcpkg_common_functions) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/assimp/assimp/archive/v3.3.1.zip" + FILENAME "assimp-3.3.1.zip" + SHA512 d8488702989629a80297b9aea1f91fd5f3d0736f91cc5d7991a41ade99a445e9897c752fbedb2829350fabb5439d4ea31d34bbedb771b3e66aef23cd40b02122 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1 + OPTIONS -DASSIMP_BUILD_TESTS=False + -DASSIMP_BUILD_ASSIMP_VIEW=False + -DASSIMP_BUILD_ZLIB=False + -DASSIMP_BUILD_ASSIMP_TOOLS=False + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_build_cmake() +vcpkg_install_cmake() + +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) + +# Handle copyright +file(COPY ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/assimp/LICENSE ${CURRENT_PACKAGES_DIR}/share/assimp/copyright) From 5979d83b5b7f3383dfdfd43f43588eab9f7f3da2 Mon Sep 17 00:00:00 2001 From: charlie barto Date: Wed, 5 Oct 2016 19:01:15 -0400 Subject: [PATCH 2/2] fixed version --- ports/assimp/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index 7089686b60d..2c4736563c2 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 3.2.1 +Version: 3.3.1 Description: The Open Asset import library Build-Depends: zlib