Updated cmake for ARM/Android build

This commit is contained in:
matlabbe
2016-01-21 17:11:57 -05:00
parent c367fe915e
commit 874816b679
13 changed files with 150 additions and 33 deletions

View File

@@ -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)