Add a section of how to link IE with CMake project (#99)
authorDmitry Kurtaev <dmitry.kurtaev+github@gmail.com>
Thu, 14 Mar 2019 10:13:27 +0000 (13:13 +0300)
committeropenvino-pushbot <44090433+openvino-pushbot@users.noreply.github.com>
Thu, 14 Mar 2019 10:13:27 +0000 (13:13 +0300)
inference-engine/README.md

index f0d6641..d28782e 100644 (file)
@@ -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: