mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
* add more examples * change to restore's output image to BGR * use BUILD_SHARED_LIBS * update graph module's cmake * add condition for spdlog package * change cmakelists * update cmakelists * add device_name in each demo * remove duplicate cmake function * use palette to draw segmentation's result * no need to find_package(pplnn) when use MMDeploy's static libs * remove MMDeploy_LIBS' dependency on spdlog * #include <opencv2/imgproc/imgproc.hpp> * change from mmdeploy_core to mmdeploy::core
21 lines
717 B
CMake
21 lines
717 B
CMake
# Copyright (c) OpenMMLab. All rights reserved.
|
|
cmake_minimum_required(VERSION 3.14)
|
|
project(mmdeploy_ncnn_net)
|
|
|
|
if("cpu" IN_LIST MMDEPLOY_TARGET_DEVICES)
|
|
include(${CMAKE_SOURCE_DIR}/cmake/common.cmake)
|
|
|
|
find_package(ncnn REQUIRED)
|
|
add_library(${PROJECT_NAME} SHARED ncnn_net.cpp)
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE mmdeploy::core ncnn)
|
|
target_link_libraries(
|
|
${PROJECT_NAME} PRIVATE -Wl,--whole-archive mmdeploy::ncnn_ops::static
|
|
-Wl,--no-whole-archive)
|
|
add_library(mmdeploy::ncnn_net ALIAS ${PROJECT_NAME})
|
|
export_module(${PROJECT_NAME})
|
|
else()
|
|
message(
|
|
ERROR
|
|
"'ncnn_net' is NOT supported in target devices: ${MMDEPLOY_TARGET_DEVICES}")
|
|
endif()
|