Skip to content

Commit

Permalink
Fix ncnn_ext build error (open-mmlab#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
grimoire committed Dec 7, 2021
1 parent 36124f6 commit 8f769e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions csrc/backend_ops/ncnn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ else()
message(FATAL_ERROR "Could not locate ncnn")
endif()

set_targets(mmdeploy_ncnn_ops NCNN_OPS_OBJ NCNN_OPS_STATIC NCNN_OPS_SHARED)

if(NOT ANDROID AND NOT IOS)
add_subdirectory(ops)
add_subdirectory(onnx2ncnn)
Expand Down
1 change: 0 additions & 1 deletion csrc/backend_ops/ncnn/ops/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.14)
project(mmdeploy_ncnn_ops)

include(${CMAKE_SOURCE_DIR}/cmake/common.cmake)
set_targets(${PROJECT_NAME} NCNN_OPS_OBJ NCNN_OPS_STATIC NCNN_OPS_SHARED)

# add plugin source
file(GLOB_RECURSE NCNN_OPS_SRCS *.cpp)
Expand Down
2 changes: 1 addition & 1 deletion csrc/backend_ops/ncnn/pyncnn_ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (NOT TARGET pybind11)
endif ()
include_directories(${pybind11_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS})
pybind11_add_module(ncnn_ext ncnn_ext.cpp)
target_link_libraries(ncnn_ext PUBLIC ncnn ${SHARED_TARGET})
target_link_libraries(ncnn_ext PUBLIC ncnn ${NCNN_OPS_SHARED})
set_target_properties(
ncnn_ext PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${CMAKE_SOURCE_DIR}/mmdeploy/backend/ncnn)

0 comments on commit 8f769e2

Please sign in to comment.