From fe1f84a5771290fa36f35478d13e117c58068b63 Mon Sep 17 00:00:00 2001 From: Scheaven <xuepengqiang> Date: 星期四, 03 六月 2021 16:10:26 +0800 Subject: [PATCH] cv --- CMakeLists.txt | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c6ed019..4256d18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,8 @@ ./lib/detecter_tools/*.hpp ./lib/detecter_tools/*.cuh ./lib/detecter_tools/darknet/*.hpp - ./lib/detecter_tools/darknet/*.cuh) + ./lib/detecter_tools/darknet/*.cuh + ) # 妫�绱㈡煡鎵炬枃浠朵俊鎭� file(GLOB sources @@ -45,7 +46,8 @@ ./lib/detecter_tools/*.cpp ./lib/detecter_tools/darknet/*.c ./lib/detecter_tools/darknet/*.cpp - ./lib/detecter_tools/darknet/*.cu) + ./lib/detecter_tools/darknet/*.cu + ) source_group("Include" FILES ${CURRENT_HEADERS}) source_group("Source" FILES ${sources}) @@ -62,7 +64,7 @@ set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}; - -gencode arch=compute_61,code=sm_61 -std=c++14# 涓嶅悓GPU鏈変笉鍚岀殑绠楀姏鎸囨暟锛屽彲鏌ョ湅绠楀姏琛� + -gencode arch=compute_61,code=sm_61 -std=c++14 # 涓嶅悓GPU鏈変笉鍚岀殑绠楀姏鎸囨暟锛屽彲鏌ョ湅绠楀姏琛� ) set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "--device-debug;-lineinfo") #find_package(OpenCV REQUIRED) # 鏌ユ壘绯荤粺鐨勯粯璁pencv鐜 @@ -70,8 +72,8 @@ endif() -# set(OPENCV_DIR /data/disk2/opt/01_opencv/opencv3.4.8) -set(OPENCV_DIR /data/disk2/opt/01_opencv/opencv2.4.13) +set(OpenCV_DIR /data/disk2/opt/01_opencv/opencv4.5.1/build) +FIND_PACKAGE(OpenCV REQUIRED) link_directories(/usr/local/cuda-10.0/lib64) #link_directories(/usr/local/lib) @@ -81,9 +83,9 @@ nvToolsExt opencv_core opencv_highgui - # opencv_imgcodecs + opencv_imgcodecs opencv_imgproc - # opencv_videoio + opencv_videoio opencv_video opencv_calib3d opencv_features2d @@ -127,4 +129,4 @@ #cuda_add_library(${PROJECT_NAME} SHARED ${sources} ${CURRENT_HEADERS}) #璁剧疆 target 闇�瑕侀摼鎺ョ殑搴� -target_link_libraries(${PROJECT_NAME} ${LIBS}) +target_link_libraries(${PROJECT_NAME} ${LIBS} ${Opencv_LIBS}) -- Gitblit v1.8.0