Skip to content

Commit

Permalink
fix compilation with cv_backports not present
Browse files Browse the repository at this point in the history
We will still need to branch for Kinetic because of package.xml
  • Loading branch information
vrabaud committed Apr 10, 2016
1 parent 2fb0c61 commit f14a6db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
cmake_minimum_required(VERSION 2.8)
project(ecto_opencv)

find_package(cv_backports QUIET)
if(cv_backports_FOUND)
find_package(catkin REQUIRED ecto opencv_candidate cv_backports)
catkin_package(DEPENDS ecto opencv_candidate cv_backports)
else()
find_package(catkin REQUIRED ecto opencv_candidate)
catkin_package(DEPENDS ecto opencv_candidate)
endif()

if(NOT CMAKE_BUILD_TYPE)#Only do this the on the first run, if the build type hasn't been set prior
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
Expand Down
11 changes: 11 additions & 0 deletions cells/cv_bp/opencv/cv_highgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@
#include <iostream>
#include <fstream>
#include <opencv2/highgui/highgui.hpp>
#if CV_MAJOR_VERSION == 2 && CV_MINOR_VERSION == 4 && CV_SUBMINOR_VERSION < 10
#include <cv_backports/imshow.hpp>
#else
namespace cv_backports {
using cv::destroyWindow;
using cv::imshow;
using cv::namedWindow;
using cv::setWindowProperty;
using cv::startWindowThread;
using cv::waitKey;
}
#endif

namespace bp = boost::python;

Expand Down

0 comments on commit f14a6db

Please sign in to comment.