|
@@ -3,7 +3,13 @@ set(SON_PROJECT_NAME tof3d)
|
|
|
message("========== Load son project ${SON_PROJECT_NAME} ==========" )
|
|
|
|
|
|
unset(OPTION_ENABLE_TENSORRT_DETECT_CODE CACHE)
|
|
|
-option(OPTION_ENABLE_TENSORRT_DETECT_CODE "" OFF)
|
|
|
+
|
|
|
+find_package(CUDA REQUIRED)
|
|
|
+if (${CUDA_FOUND})
|
|
|
+ option(OPTION_ENABLE_TENSORRT_DETECT_CODE "" ON)
|
|
|
+else ()
|
|
|
+ option(OPTION_ENABLE_TENSORRT_DETECT_CODE "" OFF)
|
|
|
+endif ()
|
|
|
message("<=${SON_PROJECT_NAME}=> OPTION_ENABLE_TENSORRT_DETECT_CODE: " ${OPTION_ENABLE_TENSORRT_DETECT_CODE})
|
|
|
|
|
|
if (OPTION_ENABLE_TENSORRT_DETECT_CODE)
|
|
@@ -53,7 +59,7 @@ if (OPTION_ENABLE_TENSORRT_DETECT_CODE)
|
|
|
${TensorRT_LIBRARIES}
|
|
|
)
|
|
|
|
|
|
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/detect yolov8_detect)
|
|
|
+ aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/detect/tensorrt_detect yolov8_detect)
|
|
|
else ()
|
|
|
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/detect/onnx_detect yolov8_detect)
|
|
|
endif ()
|