forked from Tongcheng/caffe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CaffeConfig.cmake
60 lines (48 loc) · 1.84 KB
/
CaffeConfig.cmake
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Config file for the Caffe package.
#
# Note:
# Caffe and this config file depends on opencv,
# so put `find_package(OpenCV)` before searching Caffe
# via `find_package(Caffe)`. All other lib/includes
# dependencies are hard coded in the file
#
# After successful configuration the following variables
# will be defined:
#
# Caffe_INCLUDE_DIRS - Caffe include directories
# Caffe_LIBRARIES - libraries to link against
# Caffe_DEFINITIONS - a list of definitions to pass to compiler
#
# Caffe_HAVE_CUDA - signals about CUDA support
# Caffe_HAVE_CUDNN - signals about cuDNN support
# OpenCV dependency (optional)
if(OFF)
if(NOT OpenCV_FOUND)
set(Caffe_OpenCV_CONFIG_PATH "")
if(Caffe_OpenCV_CONFIG_PATH)
get_filename_component(Caffe_OpenCV_CONFIG_PATH ${Caffe_OpenCV_CONFIG_PATH} ABSOLUTE)
if(EXISTS ${Caffe_OpenCV_CONFIG_PATH} AND NOT TARGET opencv_core)
message(STATUS "Caffe: using OpenCV config from ${Caffe_OpenCV_CONFIG_PATH}")
include(${Caffe_OpenCV_CONFIG_PATH}/OpenCVModules.cmake)
endif()
else()
find_package(OpenCV REQUIRED)
endif()
unset(Caffe_OpenCV_CONFIG_PATH)
endif()
endif()
# Compute paths
get_filename_component(Caffe_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(Caffe_INCLUDE_DIRS "/home/tl486/git_TCcaffe/caffe_solverOriginal/caffe/src;/usr/include;/home/tl486/git_TCcaffe/caffe_solverOriginal/caffe/include;/usr/local/include;/usr/local/cuda-8.0/include;/opt/OpenBLAS/include")
# Our library dependencies
if(NOT TARGET caffe AND NOT caffe_BINARY_DIR)
include("${Caffe_CMAKE_DIR}/CaffeTargets.cmake")
endif()
# List of IMPORTED libs created by CaffeTargets.cmake
set(Caffe_LIBRARIES caffe)
# Definitions
set(Caffe_DEFINITIONS "-DUSE_LMDB;-DUSE_LEVELDB")
# Cuda support variables
set(Caffe_CPU_ONLY OFF)
set(Caffe_HAVE_CUDA TRUE)
set(Caffe_HAVE_CUDNN TRUE)