2024-02-15 07:04:00 +08:00
|
|
|
vcpkg_download_distfile(PR_22011_PATH
|
|
|
|
URLS "https://github.com/openvinotoolkit/openvino/pull/22011.diff?full_index=1"
|
|
|
|
FILENAME "openvino-pr-22011.patch"
|
|
|
|
SHA512 f25de88db953a825d0a9a2f8e78664aba44eda2fecfed28ba52045c82aa5f586e42deb51cf23c47553e20c64942510500caca6e904d27ab0782270cd3047e953
|
|
|
|
)
|
|
|
|
|
2023-06-17 12:06:06 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO openvinotoolkit/openvino
|
2023-09-20 00:40:15 +08:00
|
|
|
REF "${VERSION}"
|
2024-01-25 03:21:33 +08:00
|
|
|
SHA512 d31428a02e6869e367c00a714c5599cf84fc9839376dfc4511d2abdb4aac991fc58331318102cdc248f568ca8df0bdc7f65a6744ef2dfa52d85a60a1ec77aae9
|
2023-06-17 12:06:06 +08:00
|
|
|
PATCHES
|
2023-10-25 00:19:54 +08:00
|
|
|
# vcpkg specific patch, because OV creates a file in source tree, which is prohibited
|
2023-06-17 12:06:06 +08:00
|
|
|
001-disable-tools.patch
|
2024-01-25 03:21:33 +08:00
|
|
|
# https://github.com/openvinotoolkit/openvino/pull/22139
|
|
|
|
002-conditional-enabling-of-js-api.patch
|
2024-02-15 07:04:00 +08:00
|
|
|
${PR_22011_PATH}
|
2023-06-17 12:06:06 +08:00
|
|
|
HEAD_REF master)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
cpu ENABLE_INTEL_CPU
|
|
|
|
gpu ENABLE_INTEL_GPU
|
|
|
|
auto ENABLE_AUTO
|
|
|
|
hetero ENABLE_HETERO
|
|
|
|
auto-batch ENABLE_AUTO_BATCH
|
|
|
|
ir ENABLE_OV_IR_FRONTEND
|
|
|
|
onnx ENABLE_OV_ONNX_FRONTEND
|
|
|
|
paddle ENABLE_OV_PADDLE_FRONTEND
|
|
|
|
pytorch ENABLE_OV_PYTORCH_FRONTEND
|
|
|
|
tensorflow ENABLE_OV_TF_FRONTEND
|
|
|
|
tensorflow-lite ENABLE_OV_TF_LITE_FRONTEND
|
|
|
|
)
|
|
|
|
|
|
|
|
if(ENABLE_INTEL_GPU)
|
|
|
|
# python is required for conversion of OpenCL source files into .cpp.
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
|
2023-11-29 17:29:22 +08:00
|
|
|
# remove 'rapidjson' directory and use vcpkg's one to comply with ODR
|
|
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/src/plugins/intel_gpu/thirdparty/rapidjson)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND ENABLE_INTEL_CPU)
|
2023-06-17 12:06:06 +08:00
|
|
|
message(WARNING
|
|
|
|
"OneDNN for GPU is not available for static build, which is required for dGPU."
|
2023-11-29 17:29:22 +08:00
|
|
|
"Please, consider using VCPKG_LIBRARY_LINKAGE=\"dynamic\" or disable CPU plugin,"
|
|
|
|
"which uses another flavor of oneDNN.")
|
2023-06-17 12:06:06 +08:00
|
|
|
else()
|
2023-08-09 02:40:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO oneapi-src/oneDNN
|
2024-01-25 03:21:33 +08:00
|
|
|
REF cb77937ffcf5e83b5d1cf2940c94e8b508d8f7b4
|
|
|
|
SHA512 30ede7480c5563753256b6c30360c72a63489d5225ab683601ad8c4654bedf17879ae36cdf4be6423707116eca71adbd92790bb643234c7a3b99dc6e4cfdf200
|
2023-09-20 00:40:15 +08:00
|
|
|
)
|
2023-08-09 02:40:28 +08:00
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_gpu/thirdparty/onednn_gpu")
|
2023-06-17 12:06:06 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
list(APPEND FEATURE_OPTIONS
|
|
|
|
"-DENABLE_SYSTEM_OPENCL=ON"
|
2023-11-29 17:29:22 +08:00
|
|
|
"-DPython3_EXECUTABLE=${PYTHON3}")
|
2023-06-17 12:06:06 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_INTEL_CPU)
|
2023-08-09 02:40:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO openvinotoolkit/oneDNN
|
2024-01-25 03:21:33 +08:00
|
|
|
REF cb3060bbf4694e46a1359a3d4dfe70500818f72d
|
|
|
|
SHA512 48d28273ffdfb82ad1dc6b152c812fa09ffcac387c7851e5b1393aa473ce51f9bf114d2bd462cf2003f4897907de32ab68cd2f414459c588b3155b545f3099a4
|
2023-09-20 00:40:15 +08:00
|
|
|
)
|
2023-08-09 02:40:28 +08:00
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/onednn")
|
2023-06-17 12:06:06 +08:00
|
|
|
|
2023-09-20 00:40:15 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO openvinotoolkit/mlas
|
2024-01-25 03:21:33 +08:00
|
|
|
REF 7a35e48a723944972088627be1a8b60841e8f6a5
|
|
|
|
SHA512 3094355e4d062457e6ec0b535b7dabbee5cf7257d05f7807b34a162614c96e8a6567d3fed8e955d70a69a15f26004e79a397e4d586ea81ed7b76a65dcd96a2a8
|
2023-09-20 00:40:15 +08:00
|
|
|
)
|
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/mlas")
|
|
|
|
|
2023-06-17 12:06:06 +08:00
|
|
|
if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm")
|
|
|
|
# scons (python tool) is required for ARM Compute Library building
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
|
|
|
|
x_vcpkg_get_python_packages(
|
|
|
|
PYTHON_VERSION 3
|
|
|
|
PYTHON_EXECUTABLE ${PYTHON3}
|
|
|
|
PACKAGES scons
|
|
|
|
OUT_PYTHON_VAR OV_PYTHON_WITH_SCONS
|
|
|
|
)
|
|
|
|
|
2023-08-09 02:40:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO ARM-software/ComputeLibrary
|
2023-11-29 17:29:22 +08:00
|
|
|
REF v23.08
|
|
|
|
SHA512 8379fdf804732ef4e69a3e91807810d413f35855d035cfde9d81059679f62cd625c0347f07dc1f76468dc82c06217a5ae8df25b4581a29558ac32b2a4f7d8af4
|
2023-09-20 00:40:15 +08:00
|
|
|
)
|
2023-08-09 02:40:28 +08:00
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/ComputeLibrary")
|
2023-06-17 12:06:06 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_OV_TF_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_PADDLE_FRONTEND)
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DENABLE_SYSTEM_PROTOBUF=ON")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_OV_TF_FRONTEND)
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DENABLE_SYSTEM_SNAPPY=ON")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_OV_TF_LITE_FRONTEND)
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DENABLE_SYSTEM_FLATBUFFERS=ON")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
"-DENABLE_SYSTEM_TBB=ON"
|
|
|
|
"-DENABLE_SYSTEM_PUGIXML=ON"
|
|
|
|
"-DENABLE_TBBBIND_2_5=OFF"
|
|
|
|
"-DENABLE_CLANG_FORMAT=OFF"
|
|
|
|
"-DENABLE_NCC_STYLE=OFF"
|
|
|
|
"-DENABLE_CPPLINT=OFF"
|
|
|
|
"-DENABLE_SAMPLES=OFF"
|
|
|
|
"-DENABLE_TEMPLATE=OFF"
|
|
|
|
"-DENABLE_INTEL_GNA=OFF"
|
|
|
|
"-DENABLE_PYTHON=OFF"
|
|
|
|
"-DENABLE_GAPI_PREPROCESSING=OFF"
|
|
|
|
"-DCPACK_GENERATOR=VCPKG"
|
2024-01-25 03:21:33 +08:00
|
|
|
"-DENABLE_JS=OFF"
|
2023-06-17 12:06:06 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
|
2023-09-23 05:24:37 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-06-17 12:06:06 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
2023-11-29 17:29:22 +08:00
|
|
|
|
2023-06-17 12:06:06 +08:00
|
|
|
vcpkg_install_copyright(
|
|
|
|
FILE_LIST
|
|
|
|
"${SOURCE_PATH}/LICENSE"
|
|
|
|
"${SOURCE_PATH}/licensing/third-party-programs.txt"
|
|
|
|
"${SOURCE_PATH}/licensing/onednn_third-party-programs.txt"
|
|
|
|
"${SOURCE_PATH}/licensing/runtime-third-party-programs.txt"
|
|
|
|
COMMENT
|
|
|
|
"OpenVINO License")
|
|
|
|
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|