mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Updated cmake for ARM/Android build
This commit is contained in:
@@ -77,10 +77,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <opencv2/opencv_modules.hpp>
|
||||
#if CV_MAJOR_VERSION < 3
|
||||
#ifdef HAVE_OPENCV_GPU
|
||||
#include <opencv2/gpu/gpu.hpp>
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_OPENCV_CUDAFEATURES2D
|
||||
#include <opencv2/core/cuda.hpp>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace rtabmap;
|
||||
|
||||
@@ -104,11 +108,12 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
||||
|
||||
bool haveCuda = false;
|
||||
#if CV_MAJOR_VERSION < 3
|
||||
#ifdef HAVE_OPENCV_GPU
|
||||
haveCuda = cv::gpu::getCudaEnabledDeviceCount() != 0;
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_OPENCV_CUDAFEATURES2D
|
||||
haveCuda = cv::cuda::getCudaEnabledDeviceCount() != 0;
|
||||
#ifndef HAVE_OPENCV_CUDAFEATURES2D
|
||||
haveCuda = false;
|
||||
#endif
|
||||
#endif
|
||||
if(!haveCuda)
|
||||
|
||||
Reference in New Issue
Block a user