mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
Merge pull request #26383 from mshabunin:fix-samples-cpp-17
build: raise min cmake version to 3.13 in other places
This commit is contained in:
commit
a95658f106
@ -15,15 +15,7 @@ endif()
|
||||
|
||||
include(cmake/OpenCVMinDepVersions.cmake)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
|
||||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
||||
#Required to resolve linker error issues due to incompatibility with CMake v3.0+ policies.
|
||||
#CMake fails to find _fseeko() which leads to subsequent linker error.
|
||||
#See details here: http://www.cmake.org/Wiki/CMake/Policies
|
||||
cmake_policy(VERSION 2.8)
|
||||
else()
|
||||
cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR)
|
||||
endif()
|
||||
cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR)
|
||||
|
||||
#
|
||||
# Configure CMake policies
|
||||
|
@ -110,7 +110,7 @@ endif()
|
||||
# =============================================================================
|
||||
else() # DEFINED CMAKE_HELPER_SCRIPT
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12.2)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_policy(SET CMP0012 NEW)
|
||||
include("${CMAKE_HELPER_SCRIPT}")
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVUtils.cmake")
|
||||
|
@ -61,7 +61,7 @@ int main(int argc, char** argv )
|
||||
|
||||
Now you have to create your CMakeLists.txt file. It should look like this:
|
||||
@code{.cmake}
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project( DisplayImage )
|
||||
find_package( OpenCV REQUIRED )
|
||||
include_directories( ${OpenCV_INCLUDE_DIRS} )
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(opencv_core_parallel_openmp CXX)
|
||||
|
||||
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../.." ABSOLUTE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(opencv_core_parallel_tbb CXX)
|
||||
|
||||
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../.." ABSOLUTE)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# FIXME: Rework standalone build in more generic maner
|
||||
# (Restructure directories, add common pass, etc)
|
||||
if(NOT DEFINED OPENCV_INITIAL_PASS)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(gapi_standalone)
|
||||
include("cmake/standalone.cmake")
|
||||
return()
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(opencv_highgui_gtk)
|
||||
|
||||
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../.." ABSOLUTE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project(opencv_jni_shared)
|
||||
|
||||
|
@ -25,7 +25,7 @@ add_subdirectory(python3)
|
||||
|
||||
else() # standalone build
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12.2)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(OpenCVPython CXX C)
|
||||
include("./standalone.cmake")
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../.." ABSOLUTE)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVPluginStandalone.cmake")
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
get_filename_component(OpenCV_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../.." ABSOLUTE)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVPluginStandalone.cmake")
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project("opencv")
|
||||
|
||||
|
@ -7,7 +7,7 @@ import logging as log
|
||||
log.basicConfig(format='%(message)s', level=log.DEBUG)
|
||||
|
||||
CMAKE_TEMPLATE='''\
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
|
||||
|
||||
# Enable C++17
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# load settings in case of "try compile"
|
||||
set(TOOLCHAIN_CONFIG_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toolchain.config.cmake")
|
||||
|
@ -1,5 +1,5 @@
|
||||
# cmake needs this line
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
if(NOT DEFINED EXAMPLE_NAME)
|
||||
message(FATAL_ERROR "Invalid build script: missing EXAMPLE_NAME")
|
||||
|
@ -59,7 +59,7 @@ else()
|
||||
# Standalone mode
|
||||
#
|
||||
#===================================================================================================
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project(samples C CXX)
|
||||
option(BUILD_EXAMPLES "Build samples" ON)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
set(target mixed_sample)
|
||||
project(${target} CXX)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
set(target JNIpart)
|
||||
project(${target} CXX)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# cmake needs this line
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# Define project name
|
||||
project(opencv_example_project)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.9)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
find_package(OpenCV REQUIRED COMPONENTS opencv_core)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
|
||||
|
||||
FIND_PACKAGE(CUDA REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
|
||||
@ -7,4 +7,4 @@ FIND_PACKAGE(OpenCV REQUIRED COMPONENTS core)
|
||||
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
CUDA_ADD_EXECUTABLE(opencv_thrust main.cu)
|
||||
TARGET_LINK_LIBRARIES(opencv_thrust ${OpenCV_LIBS})
|
||||
TARGET_LINK_LIBRARIES(opencv_thrust ${OpenCV_LIBS})
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
|
||||
set(PROJECT_NAME "c_hal")
|
||||
set(HAL_LIB_NAME "c_hal")
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
|
||||
set(PROJECT_NAME "slow_hal")
|
||||
set(HAL_LIB_NAME "slow_hal")
|
||||
|
Loading…
Reference in New Issue
Block a user