@@ -52,80 +52,80 @@ function(copy TARGET)
52
52
endfunction ()
53
53
54
54
# third party
55
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/eigen3" )
55
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/eigen3" )
56
56
copy (eigen3_lib
57
57
SRCS ${EIGEN_INCLUDE_DIR} /Eigen/Core ${EIGEN_INCLUDE_DIR} /Eigen/src ${EIGEN_INCLUDE_DIR} /unsupported/Eigen
58
58
DSTS ${dst_dir} /Eigen ${dst_dir} /Eigen ${dst_dir} /unsupported
59
59
)
60
60
61
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/gflags" )
61
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/gflags" )
62
62
copy (gflags_lib
63
63
SRCS ${GFLAGS_INCLUDE_DIR} ${GFLAGS_LIBRARIES}
64
64
DSTS ${dst_dir} ${dst_dir} /lib
65
65
)
66
66
67
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/glog" )
67
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/glog" )
68
68
copy (glog_lib
69
69
SRCS ${GLOG_INCLUDE_DIR} ${GLOG_LIBRARIES}
70
70
DSTS ${dst_dir} ${dst_dir} /lib
71
71
)
72
72
73
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/boost/" )
73
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/boost/" )
74
74
copy (boost_lib
75
75
SRCS ${BOOST_INCLUDE_DIR} /boost
76
76
DSTS ${dst_dir}
77
77
)
78
78
79
79
if (NOT PROTOBUF_FOUND )
80
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/protobuf" )
80
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/protobuf" )
81
81
copy (protobuf_lib
82
82
SRCS ${PROTOBUF_INCLUDE_DIR} ${PROTOBUF_LIBRARY}
83
83
DSTS ${dst_dir} ${dst_dir} /lib
84
84
)
85
85
endif ()
86
86
87
87
if (NOT CBLAS_FOUND )
88
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/openblas" )
88
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/openblas" )
89
89
copy (openblas_lib
90
90
SRCS ${CBLAS_INSTALL_DIR} /lib ${CBLAS_INSTALL_DIR} /include
91
91
DSTS ${dst_dir} ${dst_dir}
92
92
)
93
93
elseif (WITH_MKLML )
94
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/mklml" )
94
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/mklml" )
95
95
copy (mklml_lib
96
96
SRCS ${MKLML_LIB} ${MKLML_IOMP_LIB} ${MKLML_INC_DIR}
97
97
DSTS ${dst_dir} /lib ${dst_dir} /lib ${dst_dir}
98
98
)
99
99
endif ()
100
100
101
101
if (WITH_MKLDNN )
102
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/mkldnn" )
102
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/mkldnn" )
103
103
copy (mkldnn_lib
104
104
SRCS ${MKLDNN_INC_DIR} ${MKLDNN_SHARED_LIB}
105
105
DSTS ${dst_dir} ${dst_dir} /lib
106
106
)
107
107
endif ()
108
108
109
109
if (NOT MOBILE_INFERENCE AND NOT RPI )
110
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/snappy" )
110
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/snappy" )
111
111
copy (snappy_lib
112
112
SRCS ${SNAPPY_INCLUDE_DIR} ${SNAPPY_LIBRARIES}
113
113
DSTS ${dst_dir} ${dst_dir} /lib )
114
114
115
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/snappystream" )
115
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/snappystream" )
116
116
copy (snappystream_lib
117
117
SRCS ${SNAPPYSTREAM_INCLUDE_DIR} ${SNAPPYSTREAM_LIBRARIES}
118
118
DSTS ${dst_dir} ${dst_dir} /lib )
119
119
120
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /third_party/install/zlib" )
120
+ set (dst_dir "${FLUID_INSTALL_DIR } /third_party/install/zlib" )
121
121
copy (zlib_lib
122
122
SRCS ${ZLIB_INCLUDE_DIR} ${ZLIB_LIBRARIES}
123
123
DSTS ${dst_dir} ${dst_dir} /lib )
124
124
endif ()
125
125
126
126
# paddle fluid module
127
127
set (src_dir "${PADDLE_SOURCE_DIR} /paddle/fluid" )
128
- set (dst_dir "${CMAKE_INSTALL_PREFIX } /paddle/fluid" )
128
+ set (dst_dir "${FLUID_INSTALL_DIR } /paddle/fluid" )
129
129
set (module "framework" )
130
130
copy (framework_lib DEPS framework_py_proto
131
131
SRCS ${src_dir} /${module}/*.h ${src_dir} /${module}/details/*.h ${PADDLE_BINARY_DIR} /paddle/fluid/framework/framework.pb.h
@@ -165,15 +165,15 @@ copy(pybind_lib
165
165
# CMakeCache Info
166
166
copy (cmake_cache
167
167
SRCS ${CMAKE_CURRENT_BINARY_DIR} /CMakeCache.txt
168
- DSTS ${CMAKE_INSTALL_PREFIX } )
168
+ DSTS ${FLUID_INSTALL_DIR } )
169
169
170
170
add_custom_target (inference_lib_dist DEPENDS ${inference_lib_dist_dep} )
171
171
172
172
# paddle fluid version
173
173
execute_process (
174
174
COMMAND ${GIT_EXECUTABLE} log --pretty=format:%H -1
175
175
OUTPUT_VARIABLE PADDLE_GIT_COMMIT )
176
- set (version_file ${CMAKE_INSTALL_PREFIX } /version.txt )
176
+ set (version_file ${FLUID_INSTALL_DIR } /version.txt )
177
177
file (WRITE ${version_file}
178
178
"GIT COMMIT ID: ${PADDLE_GIT_COMMIT} \n "
179
179
"WITH_MKL: ${WITH_MKL} \n "
0 commit comments