Publishing R3
[platform/upstream/dldt.git] / inference-engine / ie_bridges / python / CMakeLists.txt
1 # Copyright (C) 2018 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
3 #
4 # Defines the CMake commands/policies
5 cmake_minimum_required( VERSION 2.8.5 )
6
7 # Set the project name
8 project( INFERENCE_ENGINE_DRIVER )
9
10 option(COPY_IE_LIBS "Copy Inference Engine libs to package directory" ${WIN32})
11
12 set (IE_DEFAULT_PATH computer_vision_sdk/deployment_tools/inference_engine/share)
13
14 find_package(InferenceEngine REQUIRED PATHS /opt/intel/${IE_DEFAULT_PATH} $ENV{HOME}/intel/${IE_DEFAULT_PATH})
15
16 # Make the scripts available in the 'cmake' directory available for the
17 # 'include()' command, 'find_package()' command.
18 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/cmake )
19
20 # Include the CMake script UseCython.cmake.  This defines add_cython_module().
21 # Instruction for use can be found at the top of cmake/UseCython.cmake.
22 include( UseCython )
23
24 # With CMake, a clean separation can be made between the source tree and the
25 # build tree.  When all source is compiled, as with pure C/C++, the source is
26 # no-longer needed in the build tree.  However, with pure *.py source, the
27 # source is processed directly.  To handle this, we reproduce the availability
28 # of the source files in the build tree.
29 add_custom_target( ReplicatePythonSourceTree ALL ${CMAKE_COMMAND} -P
30   ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ReplicatePythonSourceTree.cmake
31   ${CMAKE_CURRENT_BINARY_DIR}
32   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
33
34 add_custom_target( CopyIeLibs ${CMAKE_COMMAND} -P
35   ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CopyIeLibs.cmake
36   ${IE_ROOT_DIR}/bin/${_ARCH}/Release ${_IE_ROOT_LIBRARY}
37   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ie_driver )
38
39 include_directories( IE::inference_engine )
40
41 # Process the CMakeLists.txt in the 'src' and 'bin' directory.
42 add_subdirectory( inference_engine )