diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index a2cb8e7808..8bb6f8105b 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -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 diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 6d4a7ec1df..66999122db 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -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