vcpkg/ports/tensorflow-cc/TensorflowCCConfig.cmake
dan-shaw 0433989bad
[tensorflow] add new port for linux (#7568)
* [+] Add tensorflow-cc port (Linux only)

* [~] Refactor installation of tensorflow/external

  1. Install tensorflow/external to tensorflow-etc/external;
  2. Fix TensorflowCCConfig.cmake accordingly.

* [tensorflow] Work in progress

* fix tensorflow linux config

* [tensorflow] partial support for windows

* fix config paths

* use environmental variables instead

* remove files

* add python_path

* add verbose error messages

* review fixes

* [tensorflow] refactor config file

* minor changes

* set arch for CI
2019-08-20 12:13:26 -07:00

28 lines
1.2 KiB
CMake

set(tensorflow_cc_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../include")
message(WARNING "Tensorflow has vendored dependencies. You may need to manually include files from tensorflow-external")
set(tensorflow_cc_INCLUDE_DIRS
${tensorflow_cc_INCLUDE_DIR}
${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/
${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/tensorflow/
${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/external/com_google_absl
${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/bazel-out/k8-opt/bin/
${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/external/protobuf_archive/src/
)
add_library(tensorflow_cc::tensorflow_framework SHARED IMPORTED)
set_target_properties(tensorflow_cc::tensorflow_framework
PROPERTIES
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/../../lib/libtensorflow_framework.so.1.14.0
INTERFACE_INCLUDE_DIRECTORIES "${tensorflow_cc_INCLUDE_DIRS}"
)
add_library(tensorflow_cc::tensorflow_cc SHARED IMPORTED)
set_target_properties(tensorflow_cc::tensorflow_cc
PROPERTIES
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/../../lib/libtensorflow_cc.so.1.14.0
INTERFACE_INCLUDE_DIRECTORIES "${tensorflow_cc_INCLUDE_DIRS}"
)
set(tensorflow_cc_FOUND TRUE)
set(tensorflow_framework_FOUND TRUE)