forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (40 loc) · 1.5 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright (C) 2018-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(NOT ENABLE_AUTO AND NOT ENABLE_MULTI)
return()
endif()
set (TARGET_NAME "openvino_auto_plugin")
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/utils/*.cpp)
if(ENABLE_AUTO AND ENABLE_MULTI)
ov_add_plugin(NAME ${TARGET_NAME}
DEVICE_NAME "MULTI"
PSEUDO_DEVICE
SOURCES ${SOURCES}
VERSION_DEFINES_FOR src/plugin.cpp)
ov_add_plugin(NAME ${TARGET_NAME}
DEVICE_NAME "AUTO"
PSEUDO_DEVICE
PSEUDO_PLUGIN_FOR "MULTI")
elseif(ENABLE_AUTO)
ov_add_plugin(NAME ${TARGET_NAME}
DEVICE_NAME "AUTO"
PSEUDO_DEVICE
SOURCES ${SOURCES}
VERSION_DEFINES_FOR src/plugin.cpp)
elseif(ENABLE_MULTI)
ov_add_plugin(NAME ${TARGET_NAME}
DEVICE_NAME "MULTI"
PSEUDO_DEVICE
SOURCES ${SOURCES}
VERSION_DEFINES_FOR src/plugin.cpp)
endif()
find_package(Threads REQUIRED)
target_link_libraries(${TARGET_NAME} PRIVATE Threads::Threads)
ov_set_threading_interface_for(${TARGET_NAME})
# must be called after all target_link_libraries
ov_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
if(ENABLE_TESTS)
add_subdirectory(tests)
endif()