cmake: require C++11 and CMake 3.5.1+
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# cmake needs this line
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
# Enable C++11
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||
|
||||
# Define project name
|
||||
project(opencv_example_project)
|
||||
@@ -18,11 +22,6 @@ message(STATUS " version: ${OpenCV_VERSION}")
|
||||
message(STATUS " libraries: ${OpenCV_LIBS}")
|
||||
message(STATUS " include path: ${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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user