vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO openvinotoolkit/openvino REF "${VERSION}" SHA512 89c60aa8c73d91003f9fdd4e8f93213b98164ecdcd4a4264ba93352473666a290d1dd55b61cf9c5d62b0cef429f989bb31f5d4bfa67cf6d97dfc2abca45d4186 PATCHES # vcpkg specific patch, because OV creates a file in source tree, which is prohibited 001-disable-tools.patch 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) # 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) message(WARNING "OneDNN for GPU is not available for static build, which is required for dGPU." "Please, consider using VCPKG_LIBRARY_LINKAGE=\"dynamic\" or disable CPU plugin," "which uses another flavor of oneDNN.") else() vcpkg_from_github( OUT_SOURCE_PATH DEP_SOURCE_PATH REPO oneapi-src/oneDNN REF 494af5f9921bdae98f1a0e2955fa7d76ff386c4f SHA512 30c555cbe1e2f4f536ccedc920a962751ba05e2c49e38948e5da83f9b89e14eebda7450edabe51865beeebdf6b6da5fe4673c30d1db67c803f474e9093759b1f ) file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_gpu/thirdparty/onednn_gpu") endif() list(APPEND FEATURE_OPTIONS "-DENABLE_SYSTEM_OPENCL=ON" "-DPython3_EXECUTABLE=${PYTHON3}") endif() if(ENABLE_INTEL_CPU) vcpkg_from_github( OUT_SOURCE_PATH DEP_SOURCE_PATH REPO openvinotoolkit/oneDNN REF f82148befdbdc9576ec721c9d500155ee4de8060 SHA512 d4270b27ee274a5aa065ae5812db3c6ca9c898d72059eb5146f040a3ee354c8f114e45247ac37cab9fb2beee0f09eea2d0947d4f06ecbc7121b14011d3e1ce6d ) file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/onednn") vcpkg_from_github( OUT_SOURCE_PATH DEP_SOURCE_PATH REPO openvinotoolkit/mlas REF d1bc25ec4660cddd87804fcf03b2411b5dfb2e94 SHA512 8d6dd319924135b7b22940d623305bf200b812ae64cde79000709de4fad429fbd43794301ef16e6f10ed7132777b7a73e9f30ecae7c030aea80d57d7c0ce4500 ) file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/mlas") 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 ) vcpkg_from_github( OUT_SOURCE_PATH DEP_SOURCE_PATH REPO ARM-software/ComputeLibrary REF v23.08 SHA512 8379fdf804732ef4e69a3e91807810d413f35855d035cfde9d81059679f62cd625c0347f07dc1f76468dc82c06217a5ae8df25b4581a29558ac32b2a4f7d8af4 ) file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/ComputeLibrary") 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" "-DENABLE_JS=OFF" ) vcpkg_cmake_install() vcpkg_cmake_config_fixup() vcpkg_copy_pdbs() 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}")