2021-06-16 10:36:22 +08:00
|
|
|
set(TARGET_NAME mmlab_onnxruntime_ops)
|
|
|
|
set(SHARED_TARGET ${TARGET_NAME})
|
|
|
|
|
2021-10-21 11:07:35 +03:00
|
|
|
# onnxruntime (prebuilt and release)
|
|
|
|
include_directories(${ONNXRUNTIME_DIR}/include ${ONNXRUNTIME_DIR}/include/onnxruntime/core/session)
|
|
|
|
link_directories(${ONNXRUNTIME_DIR}/lib ${ONNXRUNTIME_DIR}/build/Linux/RelWithDebInfo/)
|
2021-06-16 10:36:22 +08:00
|
|
|
|
|
|
|
# add plugin source
|
2021-10-13 16:42:11 +08:00
|
|
|
file(GLOB_RECURSE BACKEND_OPS_SRCS *.cpp)
|
2021-07-23 17:16:07 +08:00
|
|
|
|
2021-06-16 10:36:22 +08:00
|
|
|
set(INFER_PLUGIN_LIB onnxruntime)
|
|
|
|
|
|
|
|
add_library(${SHARED_TARGET} SHARED ${BACKEND_OPS_SRCS})
|
|
|
|
target_link_libraries(${SHARED_TARGET} ${INFER_PLUGIN_LIB})
|
2021-10-13 16:42:11 +08:00
|
|
|
target_include_directories(${SHARED_TARGET}
|
|
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/common)
|