Skip to content

Commit e42e6ea

Browse files
authored
add inference lib to release (#11482)
1 parent 8bc74f1 commit e42e6ea

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cmake/inference_lib.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function(copy TARGET)
3939
message(FATAL_ERROR "${TARGET} source numbers are not equal to destination numbers")
4040
endif()
4141
math(EXPR len "${copy_lib_SRCS_len} - 1")
42-
42+
4343
add_custom_target(${TARGET} DEPENDS ${copy_lib_DEPS})
4444
foreach(index RANGE ${len})
4545
list(GET copy_lib_SRCS ${index} src)
@@ -155,6 +155,15 @@ copy(inference_lib DEPS paddle_fluid_shared paddle_fluid
155155
DSTS ${dst_dir}/${module} ${dst_dir}/${module}
156156
)
157157

158+
if(WITH_CONTRIB)
159+
set(contrib_dst_dir "${FLUID_INSTALL_DIR}/contrib/inference")
160+
copy(contrib_inference_lib DEPS paddle_inference_api
161+
SRCS ${PADDLE_SOURCE_DIR}/paddle/contrib/inference/paddle_inference_api.h
162+
${PADDLE_BINARY_DIR}/paddle/contrib/inference/libpaddle_inference_api.*
163+
DSTS ${contrib_dst_dir} ${contrib_dst_dir}
164+
)
165+
endif()
166+
158167
set(module "platform")
159168
copy(platform_lib DEPS profiler_py_proto
160169
SRCS ${src_dir}/${module}/*.h ${src_dir}/${module}/dynload/*.h ${src_dir}/${module}/details/*.h

0 commit comments

Comments
 (0)