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