2023-04-25 08:06:04 +08:00
|
|
|
# Set VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY instead of using `vcpkg_check_linkage` because
|
|
|
|
# these DLLs don't link with a CRT.
|
|
|
|
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled)
|
2022-04-12 08:28:18 +08:00
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2022-11-10 02:43:44 +08:00
|
|
|
URLS "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.DirectStorage/${VERSION}"
|
|
|
|
FILENAME "directstorage.${VERSION}.zip"
|
2023-11-21 11:26:38 +08:00
|
|
|
SHA512 f24f681edf0c5e047573c68ca85ab62e0ffefaf87867d45231d779e9bc8e9525891b56314cc30e58eaef20132335f011f32aba22654d2e7caf23338aeb29c6ce
|
2022-04-12 08:28:18 +08:00
|
|
|
)
|
|
|
|
|
2022-11-10 02:43:44 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
PACKAGE_PATH
|
2022-04-12 08:28:18 +08:00
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
NO_REMOVE_ONE_LEVEL
|
|
|
|
)
|
|
|
|
|
2022-05-27 04:12:36 +08:00
|
|
|
file(INSTALL "${PACKAGE_PATH}/native/include/dstorage.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
|
|
|
file(INSTALL "${PACKAGE_PATH}/native/include/dstorageerr.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
2022-04-12 08:28:18 +08:00
|
|
|
|
2022-05-27 04:12:36 +08:00
|
|
|
file(INSTALL "${PACKAGE_PATH}/native/lib/${VCPKG_TARGET_ARCHITECTURE}/dstorage.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
2022-04-12 08:28:18 +08:00
|
|
|
|
2022-05-27 04:12:36 +08:00
|
|
|
file(COPY "${PACKAGE_PATH}/native/bin/${VCPKG_TARGET_ARCHITECTURE}/dstorage.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(COPY "${PACKAGE_PATH}/native/bin/${VCPKG_TARGET_ARCHITECTURE}/dstoragecore.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
2022-04-12 08:28:18 +08:00
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug")
|
|
|
|
|
2023-11-21 11:26:38 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${PACKAGE_PATH}/LICENSE.txt")
|
2022-04-12 08:28:18 +08:00
|
|
|
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/dstorage-config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake" COPYONLY)
|