aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-06-01 15:11:06 +0800
committerPhil Christensen <philc@microsoft.com>2019-06-01 00:11:06 -0700
commitd605091f75a4657630c370cc72cfa8d14dad8e39 (patch)
treee06c1488ade28b2f6dda6e1daf224ec1e0ee19b5
parent6633185eed843707e3516d4d5ef6f7ac6f753cb5 (diff)
downloadvcpkg-d605091f75a4657630c370cc72cfa8d14dad8e39.tar.gz
vcpkg-d605091f75a4657630c370cc72cfa8d14dad8e39.zip
[assimp]Fix lrrXML library dependencies. (#6593)
* [assimp]Fix lrrXML library dependencies. * [assimp]Use FindZLIB.cmake instead of setting the zlib path. * [assimp]Delete useless path. * [assimp]Reserve macros to enable irrlich dependencies in the future.
-rw-r--r--ports/assimp/CONTROL2
-rw-r--r--ports/assimp/portfile.cmake21
-rw-r--r--ports/assimp/remove-useless-path.patch12
3 files changed, 23 insertions, 12 deletions
diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL
index 504cae234..0756978d6 100644
--- a/ports/assimp/CONTROL
+++ b/ports/assimp/CONTROL
@@ -1,4 +1,4 @@
Source: assimp
-Version: 4.1.0-4
+Version: 4.1.0-5
Description: The Open Asset import library
Build-Depends: zlib, rapidjson
diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake
index 1c40efe7e..95aefe020 100644
--- a/ports/assimp/portfile.cmake
+++ b/ports/assimp/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
PATCHES
dont-overwrite-prefix-path.patch
uninitialized-variable.patch
+ remove-useless-path.patch
)
file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake)
@@ -26,14 +27,7 @@ vcpkg_configure_cmake(
-DASSIMP_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF
-DASSIMP_INSTALL_PDB=OFF
- -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
- -DZLIB_FOUND=1
- OPTIONS_RELEASE
- -DZLIB_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/zlib.lib
- -DZLIB_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/zlib.lib
- OPTIONS_DEBUG
- -DZLIB_LIBRARIES=${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib
- -DZLIB_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib
+ #-DSYSTEM_IRRXML=ON # Wait for the built-in irrxml to synchronize with port irrlich, add dependencies and enable this macro
)
vcpkg_install_cmake()
@@ -50,9 +44,14 @@ 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})
-if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
- "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+if(WIN32)
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
+ "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+ else()
+ string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
+ "set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib \${ASSIMP_LIBRARY_DIRS}/IrrXML.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib \${ASSIMP_LIBRARY_DIRS}/../debug/lib/IrrXMLd.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
+ endif()
else()
string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
"set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/lib\${ASSIMP_LIBRARIES}.a \${ASSIMP_LIBRARY_DIRS}/libIrrXML.a \${ASSIMP_LIBRARY_DIRS}/libz.a debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/lib\${ASSIMP_LIBRARIES}d.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libIrrXMLd.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libz.a)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
diff --git a/ports/assimp/remove-useless-path.patch b/ports/assimp/remove-useless-path.patch
new file mode 100644
index 000000000..d16494f98
--- /dev/null
+++ b/ports/assimp/remove-useless-path.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4a20cee..4fcb8dd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -108,7 +108,6 @@ if (WIN32)
+ endif()
+
+ IF(MSVC)
+- SET (CMAKE_PREFIX_PATH "D:\\libs\\devil")
+ OPTION( ASSIMP_INSTALL_PDB
+ "Install MSVC debug files."
+ ON