Imported Upstream version 1.9.0
[platform/core/ml/nnfw.git] / compiler / luci-interpreter / src / CMakeLists.txt
1 nnas_find_package(TensorFlowSource EXACT 2.3.0 QUIET)
2 nnas_find_package(TensorFlowGEMMLowpSource EXACT 2.3.0 QUIET)
3 nnas_find_package(TensorFlowEigenSource EXACT 2.3.0 QUIET)
4 nnas_find_package(TensorFlowRuySource EXACT 2.3.0 QUIET)
5
6 if (NOT TensorFlowSource_FOUND)
7   message(STATUS "Skipping luci-interpreter: TensorFlow not found")
8   return()
9 endif ()
10
11 if (NOT TensorFlowGEMMLowpSource_FOUND)
12   message(STATUS "Skipping luci-interpreter: gemmlowp not found")
13   return()
14 endif ()
15
16 if (NOT TensorFlowEigenSource_FOUND)
17   message(STATUS "Skipping luci-interpreter: Eigen not found")
18   return()
19 endif ()
20
21 if (NOT TensorFlowRuySource_FOUND)
22   message(STATUS "Skipping luci-interpreter: Ruy not found")
23   return()
24 endif ()
25
26 add_subdirectory(core)
27 add_subdirectory(kernels)
28 add_subdirectory(loader)
29
30 set(SOURCES
31     "${LUCI_INTERPRETER_INCLUDE_DIR}/luci_interpreter/Interpreter.h"
32     Interpreter.cpp)
33
34 add_library(luci_interpreter SHARED ${SOURCES})
35 target_include_directories(luci_interpreter PUBLIC "${LUCI_INTERPRETER_INCLUDE_DIR}")
36 target_include_directories(luci_interpreter PRIVATE "${LUCI_INTERPRETER_SOURCE_DIR}")
37 target_link_libraries(luci_interpreter
38     PUBLIC luci_lang luci_interpreter_loader luci_interpreter_core
39     PRIVATE nncc_common)
40
41 install(TARGETS luci_interpreter DESTINATION lib)