-
-
Save TexAgg/e45c1b27a9478ae915f26db8085eb3da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Locates the tensorflow library and include dirs. | |
include(FindPackageHandleStandardArgs) | |
unset(TENSORFLOW_FOUND) | |
find_path(Tensorflow_INCLUDE_DIR | |
NAMES | |
tensorflow/core | |
tensorflow/cc | |
tensorflow/c | |
third_party | |
HINTS | |
/usr/include/tensorflow | |
/usr/local/include/tensorflow) | |
find_library(Tensorflow_LIBRARY NAMES tensorflow | |
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment