Imported Upstream version 1.7.0
[platform/core/ml/nnfw.git] / compiler / nnc / cmake / config.cmake
1 #
2 # definition of directories of all nnc component
3 #
4 set(NNC_DRIVER_DIR ${NNC_ROOT_SRC_DIR}/driver)
5 set(NNC_SOFT_BACKEND_DIR ${NNC_ROOT_SRC_DIR}/backends/soft_backend)
6 set(NNC_ACL_BACKEND_DIR ${NNC_ROOT_SRC_DIR}/backends/acl_soft_backend)
7 set(NNC_INTERPRETER_DIR ${NNC_ROOT_SRC_DIR}/backends/interpreter)
8 set(NNC_SUPPORT_DIR ${NNC_ROOT_SRC_DIR}/support)
9 set(NNC_PASS_DIR ${NNC_ROOT_SRC_DIR}/pass)
10
11 #
12 # Other additional useful cmake variables
13 #
14 set(NNC_ENABLE_UNITTEST ${ENABLE_TEST})
15 set(NNC_TARGET_EXECUTABLE nnc) # nnc main target
16
17 set(NNC_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}) # root path of installation directory
18 set(NNC_INSTALL_BIN_PATH ${NNC_INSTALL_PATH}/bin)
19 set(NNC_INSTALL_LIB_PATH ${NNC_INSTALL_PATH}/lib) # directory that contains other directories with shared library
20
21 #
22 # find necessary packages
23 #
24 nnas_find_package(HDF5 QUIET)
25
26 # defines if hdf5 package was found
27 if(HDF5_FOUND)
28   set(NNC_HDF5_SUPPORTED ON)
29 else()
30   message(WARNING "HDF5 not found, functionality of some nnc components will be disabled")
31   set(NNC_HDF5_SUPPORTED OFF)
32 endif()
33
34 if(TARGET mir_caffe2_importer)
35   set(NNC_FRONTEND_CAFFE2_ENABLED ON)
36 else()
37   set(NNC_FRONTEND_CAFFE2_ENABLED OFF)
38 endif()
39
40 if(TARGET mir_caffe_importer)
41   set(NNC_FRONTEND_CAFFE_ENABLED ON)
42 else()
43   set(NNC_FRONTEND_CAFFE_ENABLED OFF)
44 endif()
45
46 if(TARGET mir_onnx_importer)
47   set(NNC_FRONTEND_ONNX_ENABLED ON)
48 else()
49   set(NNC_FRONTEND_ONNX_ENABLED OFF)
50 endif()
51
52 if(TARGET mir_tflite_importer)
53   set(NNC_FRONTEND_TFLITE_ENABLED ON)
54 else()
55   set(NNC_FRONTEND_TFLITE_ENABLED OFF)
56 endif()