CMakeLists.txt 995 字节
Newer Older
W
serving  
wangguibao 已提交
1 2 3
find_library(MKLML_LIBS NAMES libmklml_intel.so libiomp5.so)
include(op/CMakeLists.txt)
include(proto/CMakeLists.txt)
W
wangguibao 已提交
4 5
add_executable(serving ${serving_srcs})
add_dependencies(serving pdcodegen fluid_cpu_engine pdserving paddle_fluid
W
sdk-cpp  
wangguibao 已提交
6
        opencv_imgcodecs)
W
wangguibao 已提交
7
target_include_directories(serving PUBLIC
W
sdk-cpp  
wangguibao 已提交
8 9 10
        ${CMAKE_CURRENT_LIST_DIR}/
        ${CMAKE_CURRENT_BINARY_DIR}/
        )
W
wangguibao 已提交
11
target_link_libraries(serving opencv_imgcodecs
W
sdk-cpp  
wangguibao 已提交
12
        ${opencv_depend_libs} -Wl,--whole-archive fluid_cpu_engine
W
serving  
wangguibao 已提交
13
        -Wl,--no-whole-archive pdserving paddle_fluid ${paddle_depend_libs}
W
sdk-cpp  
wangguibao 已提交
14
        ${MKLML_LIB} ${MKLML_IOMP_LIB} -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
15

W
wangguibao 已提交
16 17 18
install(TARGETS serving
        RUNTIME DESTINATION
        ${PADDLE_SERVING_INSTALL_DIR}/demo/serving/bin)
19 20 21 22 23 24
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/conf DESTINATION
        ${PADDLE_SERVING_INSTALL_DIR}/demo/serving/)
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/data DESTINATION
        ${PADDLE_SERVING_INSTALL_DIR}/demo/serving/)