-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
18 lines (13 loc) · 751 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
18 lines (13 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cmake_minimum_required(VERSION 3.18)
project(tensorflow_v2_cpp)
if(WIN32)
message(INFO "This package is not tested on Windows. Feel free to report if it works!")
endif()
find_package(CUDA REQUIRED)
find_package(OpenCV REQUIRED)
# We installed Tensorflow in /opt/tensorflow - change if you installed elsewhere
set(TENSORFLOW_LIB_DIR "/opt/tensorflow/lib")
add_executable(get_prediction get_prediction.cpp)
target_include_directories(get_prediction PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(get_prediction PRIVATE ${TENSORFLOW_LIB_DIR}/include ${OpenCV_INCLUDE_DIRS})
target_link_libraries(get_prediction ${TENSORFLOW_LIB_DIR}/libtensorflow_cc.so ${TENSORFLOW_LIB_DIR}/libtensorflow_framework.so ${OpenCV_LIBRARIES})