[Dist/Tizen] Revise packaging to fix build breaks on gcc 13
[platform/upstream/dldt.git] / inference-engine / CMakeLists.txt
1 # Copyright (C) 2018-2019 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
3 #
4
5 if (APPLE)
6     # due to https://cmake.org/cmake/help/v3.12/policy/CMP0068.html
7     cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
8 else()
9     cmake_minimum_required(VERSION 3.7.2 FATAL_ERROR)
10 endif()
11
12 project(InferenceEngine)
13
14 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
15 set(IE_MAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
16
17 include(CTest)
18 include(features)
19
20 # include developer package
21 include(developer_package)
22
23 # These options are shared with 3rdparty plugins
24 # by means of developer package
25 include(check_features)
26
27 # resolving dependencies for the project
28 include(dependencies)
29
30 message (STATUS "PROJECT ............................... " ${PROJECT_NAME})
31 message (STATUS "CMAKE_BINARY_DIR ...................... " ${CMAKE_BINARY_DIR})
32 message (STATUS "IE_MAIN_SOURCE_DIR .................... " ${IE_MAIN_SOURCE_DIR})
33 message (STATUS "CMAKE_GENERATOR ....................... " ${CMAKE_GENERATOR})
34 message (STATUS "CMAKE_C_COMPILER_ID ................... " ${CMAKE_C_COMPILER_ID})
35 message (STATUS "CMAKE_BUILD_TYPE ...................... " ${CMAKE_BUILD_TYPE})
36
37 # remove file with exported developer targets to force its regeneration
38 file(REMOVE "${CMAKE_BINARY_DIR}/targets_developer.cmake")
39
40 add_subdirectory(src)
41
42 if(ENABLE_TESTS)
43     add_subdirectory(tests)
44 endif()
45
46 add_subdirectory(thirdparty)
47
48 add_subdirectory(tools)
49
50 if (ENABLE_SAMPLES)
51     # hint for find_package(InferenceEngine in the samples folder)
52     set(InferenceEngine_DIR "${CMAKE_BINARY_DIR}")
53 endif()
54
55 # gflags and format_reader targets are kept inside of samples directory and
56 # they must be built even if samples build is disabled (required for tests and tools).
57 add_subdirectory(samples)
58
59 file(GLOB_RECURSE SAMPLES_SOURCES samples/*.cpp samples/*.hpp samples/*.h)
60 add_cpplint_target(sample_cpplint
61     FOR_SOURCES ${SAMPLES_SOURCES}
62     EXCLUDE_PATTERNS "thirdparty/*" "pugixml/*")
63
64 if (ENABLE_PYTHON)
65     add_subdirectory(ie_bridges/python)
66 endif()
67
68 add_cpplint_report_target()