Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / runtime / onert / api / CMakeLists.txt
1 file(GLOB_RECURSE API_SRC "*.cc")
2
3 set(ONERT_DEV nnfw-dev)
4 add_library(${ONERT_DEV} SHARED ${API_SRC})
5
6 # Public headers to publish
7 # nnfw_debug.h is header for runtime developer, so it will not be installed
8 # But runtime developer can use nnfw_debug.h by linking nnfw-dev
9 set(NNFW_API_HEADERS include/nnfw.h include/nnfw_dev.h)
10
11 target_link_libraries(${ONERT_DEV} PUBLIC nnfw-nnapi-header)
12 target_link_libraries(${ONERT_DEV} PUBLIC onert_core)
13 target_link_libraries(${ONERT_DEV} PRIVATE jsoncpp tflite_loader circle_loader ${LIB_PTHREAD})
14 target_link_libraries(${ONERT_DEV} PRIVATE nnfw_common)
15 target_link_libraries(${ONERT_DEV} PRIVATE nnfw_coverage)
16 target_include_directories(${ONERT_DEV} PUBLIC include)
17 set_target_properties(${ONERT_DEV} PROPERTIES PUBLIC_HEADER "${NNFW_API_HEADERS}")
18
19 install(TARGETS ${ONERT_DEV}
20         LIBRARY DESTINATION lib
21         PUBLIC_HEADER DESTINATION include/nnfw)