@@ -18,15 +18,20 @@ file(GLOB_RECURSE DEV_HEADERS ${OV_CORE_DEV_API_PATH}/*.hpp)
18
18
add_subdirectory (reference)
19
19
add_subdirectory (shape_inference)
20
20
21
- set (MIXED_SRC
22
- "${CMAKE_CURRENT_SOURCE_DIR} /src/runtime/allocator.cpp"
23
- "${CMAKE_CURRENT_SOURCE_DIR} /src/runtime/itensor.cpp"
24
- "${CMAKE_CURRENT_SOURCE_DIR} /src/runtime/ov_tensor.cpp" )
25
-
26
- set_property (SOURCE ${MIXED_SRC}
27
- APPEND PROPERTY INCLUDE_DIRECTORIES
28
- $<TARGET_PROPERTY:inference_engine_obj,SOURCE_DIR>/src
29
- $<TARGET_PROPERTY:inference_engine_plugin_api,INTERFACE_INCLUDE_DIRECTORIES >)
21
+ # TODO: remove with InferenceEngine::Blob removal
22
+ if (ON )
23
+ set (MIXED_SRC
24
+ "${CMAKE_CURRENT_SOURCE_DIR} /src/runtime/allocator.cpp"
25
+ "${CMAKE_CURRENT_SOURCE_DIR} /src/runtime/itensor.cpp"
26
+ "${CMAKE_CURRENT_SOURCE_DIR} /src/runtime/ov_tensor.cpp" )
27
+
28
+ set_property (SOURCE ${MIXED_SRC}
29
+ APPEND PROPERTY INCLUDE_DIRECTORIES
30
+ $<TARGET_PROPERTY:openvino_runtime_obj,SOURCE_DIR>/src
31
+ $<TARGET_PROPERTY:openvino_runtime_obj,SOURCE_DIR>/dev_api
32
+ $<TARGET_PROPERTY:openvino_runtime_obj,SOURCE_DIR>/include
33
+ $<TARGET_PROPERTY:openvino_runtime_obj,SOURCE_DIR>/include /ie)
34
+ endif ()
30
35
31
36
# Create named folders for the sources within the .vcproj
32
37
# Empty name lists them directly under the .vcproj
@@ -45,7 +50,8 @@ target_include_directories(openvino_core_dev INTERFACE
45
50
$<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH} >
46
51
$<BUILD_INTERFACE:${OpenVINO_SOURCE_DIR} /src/core/dev_api>
47
52
$<BUILD_INTERFACE:${OpenVINO_SOURCE_DIR} /src/frontends/common/include >
48
- $<BUILD_INTERFACE:${OpenVINO_SOURCE_DIR} /src/common/transformations/include >)
53
+ $<BUILD_INTERFACE:${OpenVINO_SOURCE_DIR} /src/common/transformations/include >
54
+ $<BUILD_INTERFACE:${OpenVINO_SOURCE_DIR} /src/common/low_precision_transformations/include >)
49
55
50
56
target_link_libraries (openvino_core_dev INTERFACE openvino::itt openvino::util)
51
57
@@ -71,44 +77,44 @@ endif()
71
77
# Create static or shared library depending on BUILD_SHARED_LIBS
72
78
#
73
79
74
- add_library (ngraph_obj OBJECT ${LIBRARY_SRC} ${PUBLIC_HEADERS} )
80
+ add_library (openvino_core_obj OBJECT ${LIBRARY_SRC} ${PUBLIC_HEADERS} )
75
81
76
82
if (ENABLE_SYSTEM_PUGIXML)
77
83
# system pugixml has /usr/include as include directories
78
84
# we cannot use them as system ones, leads to compilation errors
79
- set_target_properties (ngraph_obj PROPERTIES NO_SYSTEM_FROM_IMPORTED ON )
85
+ set_target_properties (openvino_core_obj PROPERTIES NO_SYSTEM_FROM_IMPORTED ON )
80
86
endif ()
81
87
82
- target_compile_definitions (ngraph_obj PRIVATE IMPLEMENT_OPENVINO_API)
88
+ target_compile_definitions (openvino_core_obj PRIVATE IMPLEMENT_OPENVINO_API)
83
89
84
- ov_build_target_faster(ngraph_obj
90
+ ov_build_target_faster(openvino_core_obj
85
91
UNITY
86
92
PCH PRIVATE "src/precomp.hpp" )
87
93
88
- ov_add_version_defines(src/version .cpp ngraph_obj )
94
+ ov_add_version_defines(src/version .cpp openvino_core_obj )
89
95
90
- target_link_libraries (ngraph_obj PRIVATE openvino::reference openvino::util
96
+ target_link_libraries (openvino_core_obj PRIVATE openvino::reference openvino::util
91
97
openvino::pugixml openvino::shape_inference openvino::core::dev)
92
98
93
- ov_mark_target_as_cc(ngraph_obj )
99
+ ov_mark_target_as_cc(openvino_core_obj )
94
100
95
- # ngraph is public API => need to mark this library as important for ABI free
96
- ov_abi_free_target(ngraph_obj )
101
+ # openvino_core is public API => need to mark this library as important for ABI free
102
+ ov_abi_free_target(openvino_core_obj )
97
103
98
- ov_ncc_naming_style(FOR_TARGET ngraph_obj
104
+ ov_ncc_naming_style(FOR_TARGET openvino_core_obj
99
105
SOURCE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR} /include" )
100
106
101
- ov_add_clang_format_target(ngraph_clang FOR_SOURCES ${LIBRARY_SRC} ${PUBLIC_HEADERS} ${DEV_HEADERS} )
107
+ ov_add_clang_format_target(openvino_core_clang FOR_SOURCES ${LIBRARY_SRC} ${PUBLIC_HEADERS} ${DEV_HEADERS} )
102
108
103
109
if (NOT BUILD_SHARED_LIBS )
104
- target_compile_definitions (ngraph_obj PUBLIC OPENVINO_STATIC_LIBRARY)
110
+ target_compile_definitions (openvino_core_obj PUBLIC OPENVINO_STATIC_LIBRARY)
105
111
endif ()
106
112
107
113
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
108
- # ngraph is linked against openvino::reference, openvino::shape_inference static libraries
109
- # which include ngraph headers with dllimport attribute. Linker complains about it
114
+ # openvino_core is linked against openvino::reference, openvino::shape_inference static libraries
115
+ # which include openvino_core headers with dllimport attribute. Linker complains about it
110
116
# but no way to fix this: linking with no attribute defaults to dllexport and we have
111
- # multiple defitions for ngraph symbols.
117
+ # multiple defitions for openvino_core symbols.
112
118
#
113
119
# The possible way is to use object libraries for openvino::reference
114
120
# but it's not convinient since these libraries are exported from build tree
@@ -119,10 +125,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
119
125
set (link_type PUBLIC )
120
126
endif ()
121
127
122
- target_link_options (ngraph_obj ${link_type} "/IGNORE:4217,4286" )
128
+ target_link_options (openvino_core_obj ${link_type} "/IGNORE:4217,4286" )
123
129
endif ()
124
130
125
- # some sources are located in ngraph, while headers are in inference_engine_transformations
131
+ # TODO: try to remove this and move smart reshape to transformations
132
+ # some sources are located in openvino_core, while headers are in openvino_transformations
126
133
file (GLOB_RECURSE smart_reshape_srcs ${CMAKE_CURRENT_SOURCE_DIR} /src/pass/smart_reshape/*.cpp)
127
134
file (GLOB_RECURSE rt_info_srcs ${CMAKE_CURRENT_SOURCE_DIR} /src/pass/rt_info/*.cpp)
128
135
set_source_files_properties ("${CMAKE_CURRENT_SOURCE_DIR} /src/pass/convert_precision.cpp"
@@ -133,18 +140,11 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/src/pass/convert_precis
133
140
"${CMAKE_CURRENT_SOURCE_DIR} /src/preprocess/preprocess_steps_impl.cpp"
134
141
"${CMAKE_CURRENT_SOURCE_DIR} /src/model.cpp" # for SmartReshape
135
142
${smart_reshape_srcs} ${rt_info_srcs}
136
- PROPERTIES INCLUDE_DIRECTORIES $<TARGET_PROPERTY:inference_engine_transformations ,INTERFACE_INCLUDE_DIRECTORIES >)
143
+ PROPERTIES INCLUDE_DIRECTORIES $<TARGET_PROPERTY:openvino::core::dev ,INTERFACE_INCLUDE_DIRECTORIES >)
137
144
138
145
# Defines macro in C++ to load backend plugin
139
- target_include_directories (ngraph_obj PUBLIC $<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH} >
140
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /src)
141
-
142
- add_library (ngraph INTERFACE )
143
- target_link_libraries (ngraph INTERFACE openvino::runtime)
144
- # Add an alias so that library can be used inside the build tree, e.g. when testing
145
- add_library (openvino::core ALIAS ngraph)
146
-
147
- target_include_directories (ngraph INTERFACE $<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH} >)
146
+ target_include_directories (openvino_core_obj PUBLIC $<BUILD_INTERFACE:${OV_CORE_INCLUDE_PATH} >
147
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /src)
148
148
149
149
#-----------------------------------------------------------------------------------------------
150
150
# Installation logic...
0 commit comments