-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathFindTensorFlow.cmake
More file actions
30 lines (24 loc) · 846 Bytes
/
FindTensorFlow.cmake
File metadata and controls
30 lines (24 loc) · 846 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
27
28
29
30
# Locates the tensorFlow library and include directories.
include(FindPackageHandleStandardArgs)
unset(TENSORFLOW_FOUND)
find_path(TensorFlow_INCLUDE_DIR
NAMES
tensorflow/core
tensorflow/cc
third_party
HINTS
/usr/local/include/google/tensorflow
/usr/include/google/tensorflow)
find_library(TensorFlow_LIBRARY NAMES tensorflow_all
HINTS
/usr/lib
/usr/local/lib)
# set TensorFlow_FOUND
find_package_handle_standard_args(TensorFlow DEFAULT_MSG TensorFlow_INCLUDE_DIR TensorFlow_LIBRARY)
# set external variables for usage in CMakeLists.txt
if(TENSORFLOW_FOUND)
set(TensorFlow_LIBRARIES ${TensorFlow_LIBRARY})
set(TensorFlow_INCLUDE_DIRS ${TensorFlow_INCLUDE_DIR})
endif()
# hide locals from GUI
mark_as_advanced(TensorFlow_INCLUDE_DIR TensorFlow_LIBRARY)