-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmake.template
More file actions
32 lines (25 loc) · 750 Bytes
/
Copy pathcmake.template
File metadata and controls
32 lines (25 loc) · 750 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
31
32
set(TF_TARGET_NAME "TensorflowCC")
set(TF_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
set(TF_INCLUDE_PATH "${TF_MODULE_PATH}/include")
set(TF_LIB_PATH "${TF_MODULE_PATH}/libs/libtensorflow_cc.so" "${TF_MODULE_PATH}/libs/libtensorflow_framework.so")
find_package(Protobuf REQUIRED)
add_library(${TF_TARGET_NAME} INTERFACE)
add_library(third-party::tensorflow-cc ALIAS ${TF_TARGET_NAME})
# normally should not do this
# but had trouble with XCode with out it
# TODO - investigate again
include_directories(
${PROTOBUF_INCLUDE_DIR}
)
target_include_directories(
${TF_TARGET_NAME}
INTERFACE
${TF_INCLUDE_PATH}
${PROTOBUF_INCLUDE_DIR}
)
target_link_libraries(
${TF_TARGET_NAME}
INTERFACE
${TF_LIB_PATH}
)
enable_testing ()