mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[assimp] Fix release/debug library issue. Fixes #4026.
This commit is contained in:
parent
1cb142d62e
commit
dbef253962
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user