From 83b882039ebd045a6ac3affd12d7f75db7096271 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 17 Jun 2015 17:53:05 +0200 Subject: [PATCH] Update samples/cpp/example_cmake: no need to use `include_directories` --- samples/cpp/example_cmake/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/cpp/example_cmake/CMakeLists.txt b/samples/cpp/example_cmake/CMakeLists.txt index fe7e629812..00c1687fa0 100644 --- a/samples/cpp/example_cmake/CMakeLists.txt +++ b/samples/cpp/example_cmake/CMakeLists.txt @@ -18,8 +18,10 @@ message(STATUS " version: ${OpenCV_VERSION}") message(STATUS " libraries: ${OpenCV_LIBS}") message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}") -# Add OpenCV headers location to your include paths -include_directories(${OpenCV_INCLUDE_DIRS}) +if(CMAKE_VERSION VERSION_LESS "2.8.11") + # Add OpenCV headers location to your include paths + include_directories(${OpenCV_INCLUDE_DIRS}) +endif() # Declare the executable target built from your sources add_executable(opencv_example example.cpp)