From 669bee86e580cbbc8ef40b440ab195ba2cbf5142 Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Thu, 14 Mar 2019 13:13:27 +0300 Subject: [PATCH] Add a section of how to link IE with CMake project (#99) --- inference-engine/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/inference-engine/README.md b/inference-engine/README.md index f0d6641be29..d28782e600d 100644 --- a/inference-engine/README.md +++ b/inference-engine/README.md @@ -28,6 +28,7 @@ The software was validated on: ### Build Steps 1. Clone submodules: ```sh + cd dldt/inference-engine git submodule init git submodule update --recursive ``` @@ -52,6 +53,24 @@ You can use the following additional build options: - To switch on/off the CPU and GPU plugins, use `cmake` options `-DENABLE_MKL_DNN=ON/OFF` and `-DENABLE_CLDNN=ON/OFF`. +5. Adding to your project + + For CMake projects, set an environment variable `InferenceEngine_DIR`: + + ```sh + export InferenceEngine_DIR=/path/to/dldt/inference-engine/build/ + ``` + + Then you can find Inference Engine by `find_package`: + + ```cmake + find_package(InferenceEngine) + + include_directories(${InferenceEngine_INCLUDE_DIRS}) + + target_link_libraries(${PROJECT_NAME} ${InferenceEngine_LIBRARIES} dl) + ``` + ## Build on Windows\* Systems: The software was validated on: