2020-11-12 05:38:58 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2023-01-09 17:02:28 +08:00
|
|
|
URLS "https://github.com/microsoft/onnxruntime/releases/download/v${VERSION}/onnxruntime-win-x64-gpu-${VERSION}.zip"
|
|
|
|
FILENAME "onnxruntime-win-x64-gpu-${VERSION}.zip"
|
2023-03-17 08:54:59 +08:00
|
|
|
SHA512 f927302daa7b778eaf15693e446303060c0a38dfd18b8026c28ac65f545dd463ee7cd3f0aa6bfe59301c5c85ccf4512584ed968ac42ce8d78c12a79d8af2de1e
|
2020-11-12 05:38:58 +08:00
|
|
|
)
|
|
|
|
|
2023-03-17 08:54:59 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
|
|
|
ARCHIVE "${ARCHIVE}"
|
2020-11-12 05:38:58 +08:00
|
|
|
NO_REMOVE_ONE_LEVEL
|
|
|
|
)
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY
|
|
|
|
${CURRENT_PACKAGES_DIR}/include
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib
|
|
|
|
${CURRENT_PACKAGES_DIR}/bin
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/bin
|
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY
|
2023-01-09 17:02:28 +08:00
|
|
|
${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/include
|
2020-11-12 05:38:58 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}
|
|
|
|
)
|
|
|
|
|
2023-01-09 17:02:28 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime.lib
|
2020-11-12 05:38:58 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
2023-01-09 17:02:28 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime.lib
|
2020-11-12 05:38:58 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
2023-01-09 17:02:28 +08:00
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime.pdb
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime.pdb
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_cuda.lib
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_cuda.lib
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_cuda.pdb
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_cuda.pdb
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_shared.pdb
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_shared.pdb
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_tensorrt.pdb
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_tensorrt.pdb
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_shared.lib
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_shared.lib
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_tensorrt.lib
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_tensorrt.lib
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_shared.dll
|
2020-11-12 05:38:58 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
2023-01-09 17:02:28 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_shared.dll
|
2020-11-12 05:38:58 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
2023-01-09 17:02:28 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime.dll
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime.dll
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_tensorrt.dll
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_tensorrt.dll
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_cuda.dll
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/lib/onnxruntime_providers_cuda.dll
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
2020-11-12 05:38:58 +08:00
|
|
|
# # Handle copyright
|
2023-03-17 08:54:59 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/onnxruntime-win-x64-gpu-${VERSION}/LICENSE")
|