2023-06-17 08:06:06 +04:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO openvinotoolkit/openvino
|
2023-09-19 20:40:15 +04:00
|
|
|
REF "${VERSION}"
|
2024-09-30 19:21:43 +02:00
|
|
|
SHA512 2bf3f00589d825b7f4ca40d43129d81af4ba62382f98b283a3a206e7661a7a69f178c6afafdde646db8d68cb7fc54ec5280d2f4ff4fbbffe24082cf6649dda29
|
2024-11-11 09:18:43 +01:00
|
|
|
HEAD_REF master
|
2023-06-17 08:06:06 +04:00
|
|
|
PATCHES
|
2023-10-24 20:19:54 +04:00
|
|
|
# vcpkg specific patch, because OV creates a file in source tree, which is prohibited
|
2023-06-17 08:06:06 +04:00
|
|
|
001-disable-tools.patch
|
2024-10-18 04:24:02 +00:00
|
|
|
002-fix-onnx.patch
|
2024-11-14 11:30:13 +01:00
|
|
|
003-protobuf.patch
|
2024-12-02 12:30:48 +08:00
|
|
|
add-include-chrono.patch #https://github.com/openvinotoolkit/openvino/pull/27782
|
2024-11-11 09:18:43 +01:00
|
|
|
)
|
2023-06-17 08:06:06 +04:00
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
cpu ENABLE_INTEL_CPU
|
|
|
|
gpu ENABLE_INTEL_GPU
|
2024-05-03 00:32:36 +02:00
|
|
|
npu ENABLE_INTEL_NPU
|
2023-06-17 08:06:06 +04:00
|
|
|
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 13:29:22 +04:00
|
|
|
# remove 'rapidjson' directory and use vcpkg's one to comply with ODR
|
2024-11-11 09:18:43 +01:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/src/plugins/intel_gpu/thirdparty/rapidjson")
|
2023-11-29 13:29:22 +04:00
|
|
|
|
2024-09-30 19:21:43 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO oneapi-src/oneDNN
|
|
|
|
REF 4ccd07e3a10e1c08075cf824ac14708245fbc334
|
|
|
|
SHA512 c9a28f8427b5cd9c057a546b0b62303026f848045b26e0c9705e2f64d5bc84424ee15935d3bf5ee120d3c430a9dd41b7a6e26ef4fc0c53a2154ce83fcaee8b5a
|
|
|
|
)
|
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_gpu/thirdparty/onednn_gpu")
|
2023-06-17 08:06:06 +04:00
|
|
|
|
|
|
|
list(APPEND FEATURE_OPTIONS
|
|
|
|
"-DENABLE_SYSTEM_OPENCL=ON"
|
2023-11-29 13:29:22 +04:00
|
|
|
"-DPython3_EXECUTABLE=${PYTHON3}")
|
2023-06-17 08:06:06 +04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_INTEL_CPU)
|
2023-08-08 22:40:28 +04:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO openvinotoolkit/oneDNN
|
2024-09-30 19:21:43 +02:00
|
|
|
REF c8ae8d96e963bd04214858319fa334968e5e73c9
|
|
|
|
SHA512 6877ca37c3678e738fa94767b70432d3fff73305342164d0902875d9bcce3fe12abaf52bfc6ae0ef288532324e746b01e604ab7e47f198e7776352b8f5b6f009
|
2023-09-19 20:40:15 +04:00
|
|
|
)
|
2023-08-08 22:40:28 +04:00
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/onednn")
|
2023-06-17 08:06:06 +04:00
|
|
|
|
2023-09-19 20:40:15 +04:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO openvinotoolkit/mlas
|
2024-03-08 08:22:50 +01:00
|
|
|
REF d1bc25ec4660cddd87804fcf03b2411b5dfb2e94
|
|
|
|
SHA512 8d6dd319924135b7b22940d623305bf200b812ae64cde79000709de4fad429fbd43794301ef16e6f10ed7132777b7a73e9f30ecae7c030aea80d57d7c0ce4500
|
2023-09-19 20:40:15 +04:00
|
|
|
)
|
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/mlas")
|
|
|
|
|
2023-06-17 08:06:06 +04: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-08 22:40:28 +04:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO ARM-software/ComputeLibrary
|
2024-09-30 19:21:43 +02:00
|
|
|
REF v24.08
|
|
|
|
SHA512 82debaf8d8345b79b112afdabf6019c7ad8a9b30161d3061320a3da3040b2ad49153cc508caafe9fb1182c2669c958785acf2c361382080af273465d1727a71c
|
2023-09-19 20:40:15 +04:00
|
|
|
)
|
2023-08-08 22:40:28 +04:00
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/ComputeLibrary")
|
2023-06-17 08:06:06 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2024-05-03 00:32:36 +02:00
|
|
|
if(ENABLE_INTEL_NPU)
|
2024-09-30 19:21:43 +02:00
|
|
|
list(APPEND FEATURE_OPTIONS "-DENABLE_INTEL_NPU_INTERNAL=OFF")
|
2024-05-03 00:32:36 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO oneapi-src/level-zero
|
2024-09-30 19:21:43 +02:00
|
|
|
REF v1.17.6
|
|
|
|
SHA512 bb412e875d97d1c80a0e67087e6dac1a6ffb91fa50e22deb7649ee3250c0937679d225419b52bfd7938f71a66ac15742a6a215cee7714c27e0f935e04df5b88e
|
2024-05-03 00:32:36 +02:00
|
|
|
)
|
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_npu/thirdparty/level-zero")
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO intel/level-zero-npu-extensions
|
2024-08-09 06:21:05 +02:00
|
|
|
REF 16c85231a82ee1a0b06ed7ab7da3f411a0878ed7
|
|
|
|
SHA512 983468c7706dc44cfc248c491cf51d2f69181c16ae1e400ca689df39c51112e03227c2f311173b1665115cdd33fa7d51d48e75adaf8353564a980b37c16aaa66
|
2024-05-03 00:32:36 +02:00
|
|
|
)
|
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_npu/thirdparty/level-zero-ext")
|
|
|
|
endif()
|
|
|
|
|
2023-06-17 08:06:06 +04:00
|
|
|
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()
|
|
|
|
|
2024-06-25 05:53:09 +04:00
|
|
|
if(CMAKE_HOST_WIN32)
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DENABLE_API_VALIDATOR=OFF")
|
|
|
|
endif()
|
|
|
|
|
2024-11-11 09:18:43 +01:00
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
|
|
|
|
2023-06-17 08:06:06 +04:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2024-11-11 09:18:43 +01:00
|
|
|
"-DCMAKE_DISABLE_FIND_PACKAGE_OpenCV=ON"
|
|
|
|
"-DCPACK_GENERATOR=VCPKG"
|
2023-06-17 08:06:06 +04:00
|
|
|
"-DENABLE_CLANG_FORMAT=OFF"
|
|
|
|
"-DENABLE_CPPLINT=OFF"
|
2024-11-11 09:18:43 +01:00
|
|
|
"-DENABLE_JS=OFF"
|
|
|
|
"-DENABLE_NCC_STYLE=OFF"
|
|
|
|
"-DENABLE_PYTHON=OFF"
|
2023-06-17 08:06:06 +04:00
|
|
|
"-DENABLE_SAMPLES=OFF"
|
2024-11-11 09:18:43 +01:00
|
|
|
"-DENABLE_SYSTEM_PUGIXML=ON"
|
|
|
|
"-DENABLE_SYSTEM_TBB=ON"
|
|
|
|
"-DENABLE_TBBBIND_2_5=OFF"
|
2023-06-17 08:06:06 +04:00
|
|
|
"-DENABLE_TEMPLATE=OFF"
|
2024-11-11 09:18:43 +01:00
|
|
|
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
2023-06-17 08:06:06 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
|
2023-09-22 14:24:37 -07:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-06-17 08:06:06 +04:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
|
|
|
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}")
|