mirror of
https://github.com/opencv/opencv.git
synced 2025-06-20 01:41:14 +08:00
parent
c8e88d8984
commit
cb8030809e
@ -16,7 +16,7 @@ endif()
|
|||||||
include(cmake/OpenCVMinDepVersions.cmake)
|
include(cmake/OpenCVMinDepVersions.cmake)
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
|
if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
|
||||||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||||
#Required to resolve linker error issues due to incompatibility with CMake v3.0+ policies.
|
#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.
|
#CMake fails to find _fseeko() which leads to subsequent linker error.
|
||||||
#See details here: http://www.cmake.org/Wiki/CMake/Policies
|
#See details here: http://www.cmake.org/Wiki/CMake/Policies
|
||||||
|
@ -110,7 +110,7 @@ endif()
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
else() # DEFINED CMAKE_HELPER_SCRIPT
|
else() # DEFINED CMAKE_HELPER_SCRIPT
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.12.2)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
cmake_policy(SET CMP0012 NEW)
|
cmake_policy(SET CMP0012 NEW)
|
||||||
include("${CMAKE_HELPER_SCRIPT}")
|
include("${CMAKE_HELPER_SCRIPT}")
|
||||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVUtils.cmake")
|
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVUtils.cmake")
|
||||||
|
@ -63,7 +63,7 @@ int main(int argc, char** argv )
|
|||||||
|
|
||||||
Now you have to create your CMakeLists.txt file. It should look like this:
|
Now you have to create your CMakeLists.txt file. It should look like this:
|
||||||
@code{.cmake}
|
@code{.cmake}
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project( DisplayImage )
|
project( DisplayImage )
|
||||||
find_package( OpenCV REQUIRED )
|
find_package( OpenCV REQUIRED )
|
||||||
include_directories( ${OpenCV_INCLUDE_DIRS} )
|
include_directories( ${OpenCV_INCLUDE_DIRS} )
|
||||||
|
@ -35,7 +35,7 @@ add_subdirectory(python3)
|
|||||||
|
|
||||||
else() # standalone build
|
else() # standalone build
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.12.2)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(OpenCVPython CXX C)
|
project(OpenCVPython CXX C)
|
||||||
include("./standalone.cmake")
|
include("./standalone.cmake")
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import logging as log
|
|||||||
log.basicConfig(format='%(message)s', level=log.DEBUG)
|
log.basicConfig(format='%(message)s', level=log.DEBUG)
|
||||||
|
|
||||||
CMAKE_TEMPLATE='''\
|
CMAKE_TEMPLATE='''\
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
|
||||||
|
|
||||||
# Enable C++11
|
# Enable C++11
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# cmake needs this line
|
# cmake needs this line
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
if(NOT DEFINED EXAMPLE_NAME)
|
if(NOT DEFINED EXAMPLE_NAME)
|
||||||
message(FATAL_ERROR "Invalid build script: missing EXAMPLE_NAME")
|
message(FATAL_ERROR "Invalid build script: missing EXAMPLE_NAME")
|
||||||
|
@ -62,7 +62,7 @@ else()
|
|||||||
# Standalone mode
|
# Standalone mode
|
||||||
#
|
#
|
||||||
#===================================================================================================
|
#===================================================================================================
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
project(samples C CXX)
|
project(samples C CXX)
|
||||||
option(BUILD_EXAMPLES "Build samples" ON)
|
option(BUILD_EXAMPLES "Build samples" ON)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# cmake needs this line
|
# cmake needs this line
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
# Define project name
|
# Define project name
|
||||||
project(opencv_example_project)
|
project(opencv_example_project)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
|
||||||
|
|
||||||
FIND_PACKAGE(CUDA REQUIRED)
|
FIND_PACKAGE(CUDA REQUIRED)
|
||||||
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
|
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
|
||||||
|
|
||||||
set(PROJECT_NAME "c_hal")
|
set(PROJECT_NAME "c_hal")
|
||||||
set(HAL_LIB_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.5 FATAL_ERROR)
|
||||||
|
|
||||||
set(PROJECT_NAME "slow_hal")
|
set(PROJECT_NAME "slow_hal")
|
||||||
set(HAL_LIB_NAME "slow_hal")
|
set(HAL_LIB_NAME "slow_hal")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
ocv_install_example_src(cpp *.cpp *.hpp CMakeLists.txt)
|
ocv_install_example_src(cpp *.cpp *.hpp CMakeLists.txt)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8.12.2)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
set(OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS
|
set(OPENCV_OPENVX_SAMPLE_REQUIRED_DEPS
|
||||||
opencv_core
|
opencv_core
|
||||||
|
Loading…
Reference in New Issue
Block a user