[assimp] Fix release/debug library issue. Fixes #4026.

This commit is contained in:
Robert Schumacher 2018-08-08 10:11:51 -07:00
parent 1cb142d62e
commit dbef253962
2 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,4 @@
Source: assimp
Version: 4.1.0-1
Version: 4.1.0-2
Description: The Open Asset import library
Build-Depends: zlib

View File

@ -16,6 +16,8 @@ vcpkg_apply_patches(
)
file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake)
file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/zlib)
set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
@ -26,6 +28,14 @@ vcpkg_configure_cmake(
-DASSIMP_BUILD_ZLIB=OFF
-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()
@ -40,10 +50,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
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})
string(REPLACE "assimp\${ASSIMP_LIBRARY_SUFFIX}"
"assimp\${ASSIMP_LIBRARY_SUFFIX}.lib" ASSIMP_CONFIG ${ASSIMP_CONFIG})
string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
"set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES})" ASSIMP_CONFIG ${ASSIMP_CONFIG})
"set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake "${ASSIMP_CONFIG}")
# Handle copyright