mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:53:02 +08:00
[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.
This commit is contained in:
parent
6633185eed
commit
d605091f75
@ -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
|
||||
|
@ -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})
|
||||
|
12
ports/assimp/remove-useless-path.patch
Normal file
12
ports/assimp/remove-useless-path.patch
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user