mmdeploy/csrc/backend_ops/ncnn/CMakeLists.txt
lzhangzz 567ec62296
[Fix] Fix recent build problems (#544)
* simplify deps management

* skip visibility flags for MSVC

* simplify cuda deps

* naming

* workaround for cmake<3.17

* add spdlog dependency

* move the enablement of CUDA to top level CMakeLists.txt

* fix MSVC build

* fix lint

* fix build for backend ops only

* remove comment

* allow to use apis/python as a standalone project

* remove redundant cmake code

* control shared or static lib using `MMDEPLOY_SHARED_LIBS` instead of `BUILD_SHARED_LIBS`

* fix MSVC build

* update docs
2022-06-06 11:19:34 +08:00

23 lines
555 B
CMake
Executable File

# Copyright (c) OpenMMLab. All rights reserved.
# 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 ()