Skip to content

Commit 0e1c127

Browse files
committed
fix inference_lib_dist deps
1 parent 8f7b020 commit 0e1c127

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

cmake/inference_lib.cmake

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,36 @@ set(dst_dir "${FLUID_INSTALL_DIR}/third_party/eigen3")
5656
copy(eigen3_lib
5757
SRCS ${EIGEN_INCLUDE_DIR}/Eigen/Core ${EIGEN_INCLUDE_DIR}/Eigen/src ${EIGEN_INCLUDE_DIR}/unsupported/Eigen
5858
DSTS ${dst_dir}/Eigen ${dst_dir}/Eigen ${dst_dir}/unsupported
59+
DEPS eigen3
5960
)
6061

6162
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/gflags")
6263
copy(gflags_lib
6364
SRCS ${GFLAGS_INCLUDE_DIR} ${GFLAGS_LIBRARIES}
6465
DSTS ${dst_dir} ${dst_dir}/lib
66+
DEPS gflags
6567
)
6668

6769
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/glog")
6870
copy(glog_lib
6971
SRCS ${GLOG_INCLUDE_DIR} ${GLOG_LIBRARIES}
7072
DSTS ${dst_dir} ${dst_dir}/lib
73+
DEPS glog
7174
)
7275

7376
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/boost/")
7477
copy(boost_lib
7578
SRCS ${BOOST_INCLUDE_DIR}/boost
7679
DSTS ${dst_dir}
80+
DEPS boost
7781
)
7882

7983
if(NOT PROTOBUF_FOUND)
8084
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/protobuf")
8185
copy(protobuf_lib
8286
SRCS ${PROTOBUF_INCLUDE_DIR} ${PROTOBUF_LIBRARY}
8387
DSTS ${dst_dir} ${dst_dir}/lib
88+
DEPS extern_protobuf
8489
)
8590
endif()
8691

@@ -89,12 +94,14 @@ if(NOT CBLAS_FOUND)
8994
copy(openblas_lib
9095
SRCS ${CBLAS_INSTALL_DIR}/lib ${CBLAS_INSTALL_DIR}/include
9196
DSTS ${dst_dir} ${dst_dir}
97+
DEPS extern_openblas
9298
)
9399
elseif (WITH_MKLML)
94100
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/mklml")
95101
copy(mklml_lib
96102
SRCS ${MKLML_LIB} ${MKLML_IOMP_LIB} ${MKLML_INC_DIR}
97103
DSTS ${dst_dir}/lib ${dst_dir}/lib ${dst_dir}
104+
DEPS mklml
98105
)
99106
endif()
100107

@@ -103,24 +110,28 @@ if(WITH_MKLDNN)
103110
copy(mkldnn_lib
104111
SRCS ${MKLDNN_INC_DIR} ${MKLDNN_SHARED_LIB}
105112
DSTS ${dst_dir} ${dst_dir}/lib
113+
DEPS mkldnn
106114
)
107115
endif()
108116

109117
if(NOT MOBILE_INFERENCE AND NOT RPI)
110118
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/snappy")
111119
copy(snappy_lib
112120
SRCS ${SNAPPY_INCLUDE_DIR} ${SNAPPY_LIBRARIES}
113-
DSTS ${dst_dir} ${dst_dir}/lib)
121+
DSTS ${dst_dir} ${dst_dir}/lib
122+
DEPS snappy)
114123

115124
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/snappystream")
116125
copy(snappystream_lib
117126
SRCS ${SNAPPYSTREAM_INCLUDE_DIR} ${SNAPPYSTREAM_LIBRARIES}
118-
DSTS ${dst_dir} ${dst_dir}/lib)
127+
DSTS ${dst_dir} ${dst_dir}/lib
128+
DEPS snappystream)
119129

120130
set(dst_dir "${FLUID_INSTALL_DIR}/third_party/install/zlib")
121131
copy(zlib_lib
122132
SRCS ${ZLIB_INCLUDE_DIR} ${ZLIB_LIBRARIES}
123-
DSTS ${dst_dir} ${dst_dir}/lib)
133+
DSTS ${dst_dir} ${dst_dir}/lib
134+
DEPS zlib)
124135
endif()
125136

126137
# paddle fluid module

0 commit comments

Comments
 (0)