VCPKG docs for dynamic OpenVINO build (#20127)
* VCPKG docs for dynamic OpenVINO build * Apply suggestions from code review Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> * Update installing-openvino-vcpkg.md * Update docs/install_guides/installing-openvino-vcpkg.md Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> --------- Co-authored-by: Sebastian Golebiewski <sebastianx.golebiewski@intel.com>
This commit is contained in:
parent
744f5d4130
commit
3de1332838
@ -55,7 +55,7 @@ Installing OpenVINO Runtime
|
|||||||
|
|
||||||
vcpkg install 'openvino[core,cpu,ir]'
|
vcpkg install 'openvino[core,cpu,ir]'
|
||||||
|
|
||||||
vcpkg also provides a way to install OpenVINO for any specific configuration you want via `triplets <https://learn.microsoft.com/en-us/vcpkg/users/triplets>`, for example to install OpenVINO statically on Windows, use:
|
vcpkg also provides a way to install OpenVINO for any specific configuration you want via `triplets <https://learn.microsoft.com/en-us/vcpkg/users/triplets>`__, for example to install OpenVINO statically on Windows, use:
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
@ -64,6 +64,37 @@ Installing OpenVINO Runtime
|
|||||||
Note that the vcpkg installation means building all packages and dependencies from source,
|
Note that the vcpkg installation means building all packages and dependencies from source,
|
||||||
which means the compiler stage will require additional time to complete the process.
|
which means the compiler stage will require additional time to complete the process.
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
|
||||||
|
If you are building OpenVINO as dynamic libraries and you want to use either Paddle, TensorFlow or ONNX frontends, you need to create `custom vcpkg <https://learn.microsoft.com/en-us/vcpkg/users/triplets#per-port-customization>`__ triplet file, like ``<VCPKG_ROOT>/triplets/community/x64-linux-release-dynamic.cmake``, which builds ``protobuf`` dependency statically:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
# typical values of vcpkg toolchain
|
||||||
|
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||||
|
set(VCPKG_CRT_LINKAGE dynamic)
|
||||||
|
# by default, all libraries are built dynamically
|
||||||
|
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||||
|
|
||||||
|
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(VCPKG_BUILD_TYPE release)
|
||||||
|
|
||||||
|
set(VCPKG_FIXUP_ELF_RPATH ON)
|
||||||
|
|
||||||
|
# OpenVINO specific additions: build statically the following internal dependencies
|
||||||
|
# IMPORTANT: you need to build at least protobuf statically, others can be dynamic
|
||||||
|
if(PORT MATCHES "^(ade|hwloc|onnx|protobuf|pugixml|snappy)$")
|
||||||
|
set(VCPKG_LIBRARY_LINKAGE static)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
Then, you can use such a triplet file with the following command:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
vcpkg install openvino:x64-linux-release-dynamic
|
||||||
|
|
||||||
|
|
||||||
After installation, you can use OpenVINO in your product's cmake scripts:
|
After installation, you can use OpenVINO in your product's cmake scripts:
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
@ -74,7 +105,7 @@ And running from terminal:
|
|||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
cmake -B <build dir> -S <source dir> -DCMAKE_TOOLCHAIN_FILE=<path to vcpkg>/scripts/buildsystems/vcpkg.cmake
|
cmake -B <build dir> -S <source dir> -DCMAKE_TOOLCHAIN_FILE=<VCPKG_ROOT>/scripts/buildsystems/vcpkg.cmake
|
||||||
|
|
||||||
Congratulations! You've just Installed and used OpenVINO in your project! For some use cases you may still
|
Congratulations! You've just Installed and used OpenVINO in your project! For some use cases you may still
|
||||||
need to install additional components. Check the
|
need to install additional components. Check the
|
||||||
|
Loading…
Reference in New Issue
Block a user