mmdeploy/backend_ops/ncnn/CMakeLists.txt
q.yao ea3078aa56
Update custom ops namespace (#158)
* Update custom ops namespace

* rename register, rename generated library name

* rename domain to mmcv
2021-11-01 10:48:21 +08:00

24 lines
606 B
CMake
Executable File

set(TARGET_NAME mmdeploy_ncnn_ops)
set(SHARED_TARGET ${TARGET_NAME})
# ncnn
set(ncnn_DIR ${NCNN_DIR}/build/install/lib/cmake/ncnn)
find_package(ncnn)
if(ncnn_FOUND)
message(STATUS "ncnn library found!")
else()
message(FATAL_ERROR "Could not locate ncnn")
endif()
if(NOT ANDROID AND NOT IOS)
add_subdirectory(ops)
add_subdirectory(onnx2ncnn)
add_subdirectory(pyncnn_ext)
else()
# In case of embedded platform, like android, or ios, we only build custom ncnn
# ops, and leave the executable converter(onnx2ncnn, pyncnn_ext) built under
# the host platforms
add_subdirectory(ops)
endif()