diff --git a/onnx/CMakeLists.txt b/onnx/CMakeLists.txt index c178f99..72c614e 100644 --- a/onnx/CMakeLists.txt +++ b/onnx/CMakeLists.txt @@ -56,7 +56,8 @@ ament_target_dependencies(${PROJECT_NAME} onnxruntime_vendor ros_msft_onnx_msgs tf2 - geometry_msgs) + geometry_msgs + OpenCV) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/models/tinyyolov2-8.onnx diff --git a/onnxruntime_vendor/CMakeLists.txt b/onnxruntime_vendor/CMakeLists.txt index 6b31969..27cf834 100644 --- a/onnxruntime_vendor/CMakeLists.txt +++ b/onnxruntime_vendor/CMakeLists.txt @@ -5,16 +5,9 @@ cmake_minimum_required(VERSION 3.5) project(onnxruntime_vendor) find_package(ament_cmake REQUIRED) +find_package(CUDA 10 QUIET) -# disable Cuda build on github ci -if(DEFINED ENV{GITHUB_WORKSPACE}) - message("Detected Github CI, building without CUDA") - option(CUDA_SUPPORT "use CUDA support onnxruntime library" OFF) -else() - option(CUDA_SUPPORT "use CUDA support onnxruntime library" ON) -endif() - -if(CUDA_SUPPORT) +if(CUDA_FOUND) message("Building with Cuda support") set(PACKAGE_URL "https://www.nuget.org/api/v2/package/Microsoft.ML.OnnxRuntime.Gpu/1.4.0") set(PACKAGE_SHA512 "c9c2ba5c594c92c1e426e9c53f9909e8851a41c99f48f8a369e082f8047d521b236f2fbb943e73975cbb45bd9957f20139c25959e50e1679dca9eeac08f73b31")