Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[assimp]Fix lrrXML library dependencies. #6593

Merged
merged 5 commits into from
Jun 1, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/assimp/CONTROL
Original file line number Diff line number Diff line change
@@ -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
18 changes: 8 additions & 10 deletions ports/assimp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -26,14 +27,6 @@ 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
)

vcpkg_install_cmake()
Expand All @@ -51,8 +44,13 @@ string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)"
"set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG})

if(WIN32)
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 (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})
Expand Down
12 changes: 12 additions & 0 deletions ports/assimp/remove-useless-path.patch
Original file line number Diff line number Diff line change
@@ -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