Inference Engine build infrastructure provides the Inference Engine Developer Package for plugin development.
To automatically generate the Inference Engine Developer Package, run the
cmake tool during a DLDT build:
Once the commands above are executed, the Inference Engine Developer Package is generated in the
dldt-release-build folder. It consists of several files:
InferenceEngineDeveloperPackageConfig.cmake- the main CMake script which imports targets and provides compilation flags and CMake options.
InferenceEngineDeveloperPackageConfig-version.cmake- a file with a package version.
targets_developer.cmake- an automatically generated file which contains all targets exported from the OpenVINO build tree. This file is included by
InferenceEngineDeveloperPackageConfig.cmaketo import the following targets:
IE::ngraph- shared nGraph library
IE::inference_engine- shared Inference Engine library
IE::inference_engine_transformations- shared library with Inference Engine ngraph-based Transformations
IE::inference_engine_preproc- shared library with Inference Engine preprocessing plugin
IE::inference_engine_plugin_api- interface library with Inference Engine Plugin API headers
IE::inference_engine_lp_transformations- shared library with low-precision transformations
IE::pugixml- static Pugixml library
IE::xbyak- interface library with Xbyak headers
IE::itt- static library with tools for performance measurement using Intel ITT
IE::gmock- Google Tests framework libraries
IE::commonTestUtils- static library with common tests utilities
IE::funcTestUtils- static library with functional tests utilities
IE::unitTestUtils- static library with unit tests utilities
IE::ngraphFunctions- static library with the set of
IE::funcSharedTests- static library with common functional tests
Note: it's enough just to run
cmake --build . --target ie_dev_targetscommand to build only targets from the Inference Engine Developer package.
To build a plugin source tree using the Inference Engine Developer Package, run the commands below:
A common plugin consists of the following components:
To build a plugin and its tests, run the following CMake scripts:
CMakeLists.txt, which finds the Inference Engine Developer Package using the
find_packageCMake command and adds the
testssubdirectories with plugin sources and their tests respectively:
NOTE: The default values of the
ENABLE_FUNCTIONAL_TESTSoptions are shared via the Inference Engine Developer Package and they are the same as for the main DLDT build tree. You can override them during plugin build using the command below:
```bash $ cmake -DENABLE_FUNCTIONAL_TESTS=OFF -DInferenceEngineDeveloperPackage_DIR=../dldt-release-build ../template-plugin ```
src/CMakeLists.txtto build a plugin shared library from sources:
IE::inference_enginetarget is imported from the Inference Engine Developer Package.
tests/functional/CMakeLists.txtto build a set of functional plugin tests:
IE::funcSharedTestsstatic library with common functional Inference Engine Plugin tests is imported via the Inference Engine Developer Package.