Skip to content

Commit

Permalink
target link
Browse files Browse the repository at this point in the history
  • Loading branch information
AllentDan committed Jan 25, 2022
1 parent 38f1fd0 commit 3b3e840
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions demo/csrc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ project(mmdeploy-example)
find_package(OpenCV REQUIRED)
find_package(MMDeploy REQUIRED)

set(MMDeploy_LIBS ${MMDEPLOY_LIBS}
-Wl,--no-as-needed ${MMDEPLOY_DYNAMIC_MODULES} -Wl,--as-needed
-Wl,--whole-archive ${MMDEPLOY_STATIC_MODULES} -Wl,--no-whole-archive
-Wl,--disable-new-dtags)

function(add_example name)
add_executable(${name} ${name}.cpp)
target_link_libraries(${name} ${MMDeploy_LIBS} opencv_imgcodecs
opencv_imgproc opencv_core)
target_link_libraries(${name} ${MMDeploy_LIBS} -Wl,--disable-new-dtags
opencv_imgcodecs opencv_imgproc opencv_core)
endfunction()

add_example(image_classification)
Expand Down

0 comments on commit 3b3e840

Please sign in to comment.