[cpprestsdk] Fix usage issue when building static (#12006)

This commit is contained in:
Jack·Boos·Yu 2020-06-24 04:12:42 +08:00 committed by GitHub
parent 2ad479e667
commit 088963227e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,5 @@
Source: cpprestsdk
Version: 2.10.16-2
Version: 2.10.16-3
Build-Depends: openssl (!uwp&!windows), boost-system (!uwp&!windows),
boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows),
boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows),

View File

@ -45,4 +45,9 @@ vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/cpprest/details/cpprest_compat.h
"#ifdef _NO_ASYNCRTIMP" "#if 1")
endif()
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)