blob: 598edf6030b0799665be5d61ad8a2f7ee166a023 (
plain)
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
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 300e4ea..155dd0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -614,6 +614,7 @@ if(APPLE)
set_target_properties(onnx PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif()
+if(ONNXIFI_ENABLE_EXT)
# ---[ ONNX Interface for Framework Integratin (ONNXIFI)
add_library(onnxifi INTERFACE)
target_include_directories(onnxifi INTERFACE
@@ -688,6 +689,7 @@ if(MSVC)
# lists from 'identifier2'
)
endif()
+endif() # ONNXIFI_ENABLE_EXT
include(GNUInstallDirs)
@@ -737,8 +739,14 @@ install(FILES
install(EXPORT ONNXTargets DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ONNX")
install(TARGETS
onnx onnx_proto
- onnxifi onnxifi_dummy onnxifi_loader
EXPORT ONNXTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
+if(ONNXIFI_ENABLE_EXT)
+ install(TARGETS
+ onnxifi onnxifi_dummy onnxifi_loader
+ EXPORT ONNXTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT ANDROID AND NOT IOS)
install(TARGETS onnxifi_wrapper
@@ -748,6 +756,7 @@ endif()
if(ONNXIFI_DUMMY_BACKEND)
add_definitions(-DONNXIFI_DUMMY_BACKEND=1)
endif()
+endif() # ONNXIFI_ENABLE_EXT
if(ONNX_BUILD_TESTS)
include(${ONNX_ROOT}/cmake/unittest.cmake)
|