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-05-03 06:32:36 +08:00
|
|
|
SHA512 ddada33aac43f707c36868ef12861445f08856f0df3b086e509bc294ff54ad1f55afd7e2b44c6f8444b0d74532b46cfc217f45a4635eeec4ef96bb55d12deab6
|
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
|
|
|
|
HEAD_REF master)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
cpu ENABLE_INTEL_CPU
|
|
|
|
gpu ENABLE_INTEL_GPU
|
2024-05-03 06:32:36 +08:00
|
|
|
npu ENABLE_INTEL_NPU
|
2023-06-17 12:06:06 +08: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 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-05-03 06:32:36 +08:00
|
|
|
REF 4e6ff043c439652fcf6c400ac4e0c81bbac7c71c
|
|
|
|
SHA512 456332fdaf0d20d48bb1caaab1fa0b933c59d145f09ba4b1083d044207dd488d08a6eae84877b410cc7ba55cea251fa2652dabe92f25d75483fa723a0949df72
|
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-05-03 06:32:36 +08:00
|
|
|
REF 26633ae49edd4353a29b7170d9fcef6b2d7
|
|
|
|
SHA512 554c8050b5012248189c45bd51dbce6efa3a4b19f018a09a423b5dfa79da32a56a24c02ba24447e9a1f4d424b1e46e19322d8d02d622ef7c6a6910cdda991756
|
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-03-08 15:22:50 +08:00
|
|
|
REF d1bc25ec4660cddd87804fcf03b2411b5dfb2e94
|
|
|
|
SHA512 8d6dd319924135b7b22940d623305bf200b812ae64cde79000709de4fad429fbd43794301ef16e6f10ed7132777b7a73e9f30ecae7c030aea80d57d7c0ce4500
|
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
|
2024-05-03 06:32:36 +08:00
|
|
|
REF v24.02.1
|
|
|
|
SHA512 3a27458e5a0f72654aa7f7cd7145ec20678b49cd4e49846c9097855595c12d29b9753cd38b0825b5d6ffeeb40db1563defac8a0aebd71ee45a34abc26e21e285
|
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()
|
|
|
|
|
2024-05-03 06:32:36 +08:00
|
|
|
if(ENABLE_INTEL_NPU)
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH DEP_SOURCE_PATH
|
|
|
|
REPO oneapi-src/level-zero
|
|
|
|
REF 4ed13f327d3389285592edcf7598ec3cb2bc712e
|
|
|
|
SHA512 1159b2dc59ffe201821aa6c4c65c1803f8be26654a5f7e09d4e2cea70afdaf6a49508acbc74279d2d5c8fc7b632ad29b70ea506c442cd599d7db47323de9e62d
|
|
|
|
)
|
|
|
|
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
|
|
|
|
REF 0e1c471356a724ef6d176ba027a68e210d90939e
|
|
|
|
SHA512 586c516e636afb9c1930fbc5faa0ceb130cd0507273fad10b96cd5c3450fb5c76b9bcbc9be630ac5ff3cd97f8108a96fa5d87dce7111be2ff2a59ab92053329c
|
|
|
|
)
|
|
|
|
file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_npu/thirdparty/level-zero-ext")
|
|
|
|
endif()
|
|
|
|
|
2023-06-17 12:06:06 +08: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()
|
|
|
|
|
|
|
|
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_PYTHON=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}")
|