-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
26 lines (19 loc) · 736 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
26 lines (19 loc) · 736 Bytes
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
cmake_minimum_required(VERSION 3.16)
project(main)
# Try to find OpenCV
# set(OpenCV_DIR ....)
find_package(OpenCV 4 REQUIRED)
# include has 2 subdirectories: tensorflow and flatbuffers
# get the folder form https://github.com/muhammedakyuzlu/tensorflow_lite_libs_cpp.git
INCLUDE_DIRECTORIES("[path/tensorflow_lite_libs_cpp/include/]")
# lib has 1 file: libtensorflowlite.so
ADD_LIBRARY(tensorflowlite SHARED IMPORTED)
set_property(TARGET tensorflowlite PROPERTY IMPORTED_LOCATION path/to/tensorflow_lite_libs_cpp/libs/libtensorflowlite.so)
file(GLOB SOURCE_FILES src/*.cpp)
add_executable(${CMAKE_PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(
${CMAKE_PROJECT_NAME}
${OpenCV_LIBS}
tensorflowlite
pthread
)