FILE(GLOB op_srcs ${CMAKE_CURRENT_LIST_DIR}/*.cpp ${CMAKE_CURRENT_LIST_DIR}/../../predictor/tools/quant.cpp)
if(WITH_OPENCV)
    FILE(GLOB ocrtools_srcs ${CMAKE_CURRENT_LIST_DIR}/../../predictor/tools/ocrtools/*.cpp)
    FILE(GLOB ppshitu_tools_srcs ${CMAKE_CURRENT_LIST_DIR}/../../predictor/tools/pp_shitu_tools/*.cpp)
    LIST(APPEND op_srcs ${ppshitu_tools_srcs})
    LIST(APPEND op_srcs ${ocrtools_srcs})
else()
    LIST(APPEND EXCLUDE_LIST "general_detection_op.cpp")
    LIST(APPEND EXCLUDE_LIST "general_picodet_op.cpp")
    LIST(APPEND EXCLUDE_LIST "general_feature_extract_op.cpp")
    foreach (TMP_PATH ${op_srcs})
        foreach (EXCLUDE_DIR ${EXCLUDE_LIST})
            string (FIND ${TMP_PATH} ${EXCLUDE_DIR} EXCLUDE_DIR_FOUND)
            if (NOT ${EXCLUDE_DIR_FOUND} EQUAL -1)
                list (REMOVE_ITEM op_srcs ${TMP_PATH})
                break()
            endif ()
        endforeach(EXCLUDE_DIR)
    endforeach(TMP_PATH)
endif()
LIST(APPEND serving_srcs ${op_srcs})
