aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-11-01 01:54:16 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-11-01 01:56:06 -0700
commit0a4b09d9c57954b3a55d893134cde1ab7eafcbdb (patch)
tree98831874ac15700a699f6bacf1b95a57012e979a
parent7435624eece6ff3e58a8c3fa6f0dc563317c7bf3 (diff)
downloadvcpkg-0a4b09d9c57954b3a55d893134cde1ab7eafcbdb.tar.gz
vcpkg-0a4b09d9c57954b3a55d893134cde1ab7eafcbdb.zip
[assimp] Fix assimp overwriting CMAKE_PREFIX_PATH.
-rw-r--r--ports/assimp/CONTROL2
-rw-r--r--ports/assimp/dont-overwrite-prefix-path.patch12
-rw-r--r--ports/assimp/portfile.cmake19
3 files changed, 23 insertions, 10 deletions
diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL
index bae5c7fb2..9666a06b3 100644
--- a/ports/assimp/CONTROL
+++ b/ports/assimp/CONTROL
@@ -1,4 +1,4 @@
Source: assimp
-Version: 4.0.1-1
+Version: 4.0.1-2
Description: The Open Asset import library
Build-Depends: zlib
diff --git a/ports/assimp/dont-overwrite-prefix-path.patch b/ports/assimp/dont-overwrite-prefix-path.patch
new file mode 100644
index 000000000..fc58a99c5
--- /dev/null
+++ b/ports/assimp/dont-overwrite-prefix-path.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d781d1f..0d64d50 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -92,7 +92,6 @@ if (WIN32)
+ endif()
+
+ IF(MSVC)
+- set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
+ OPTION( ASSIMP_INSTALL_PDB
+ "Install MSVC debug files."
+ ON
diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake
index 660c9d40e..496300240 100644
--- a/ports/assimp/portfile.cmake
+++ b/ports/assimp/portfile.cmake
@@ -10,17 +10,20 @@ vcpkg_from_github(
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch
+ PATCHES
+ "${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/dont-overwrite-prefix-path.patch"
)
+file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS -DASSIMP_BUILD_TESTS=False
- -DASSIMP_BUILD_ASSIMP_VIEW=False
- -DASSIMP_BUILD_ZLIB=False
- -DASSIMP_BUILD_ASSIMP_TOOLS=False
- -DASSIMP_INSTALL_PDB=False
- -DZLIB_HOME=${CURRENT_INSTALLED_DIR}
+ OPTIONS -DASSIMP_BUILD_TESTS=OFF
+ -DASSIMP_BUILD_ASSIMP_VIEW=OFF
+ -DASSIMP_BUILD_ZLIB=OFF
+ -DASSIMP_BUILD_ASSIMP_TOOLS=OFF
+ -DASSIMP_INSTALL_PDB=OFF
)
vcpkg_install_cmake()
@@ -30,8 +33,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.0")
vcpkg_copy_pdbs()
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share)
-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)