do not use WIN64/_WIN64 anymore - CMake did not set it anyway. Use WIN32 + __x86_64 or _M_X64 instead. Also, make VideoInput optional (WITH_VIDEOINPUT=ON/OFF) => now Mingw-dw2 can build OpenCV
This commit is contained in:
@@ -284,6 +284,10 @@ set(WITH_TBB OFF CACHE BOOL "Include TBB support")
|
||||
set(WITH_EIGEN2 ON CACHE BOOL "Include Eigen2 support")
|
||||
set(WITH_CUDA OFF CACHE BOOL "Include NVidia Cuda Runtime support")
|
||||
|
||||
if(WIN32)
|
||||
set(WITH_VIDEOINPUT ON CACHE BOOL "Enable VideoInput support")
|
||||
endif()
|
||||
|
||||
# ===================================================
|
||||
# Macros that checks if module have been installed.
|
||||
# After it adds module to build and define
|
||||
@@ -609,7 +613,7 @@ if (WITH_TBB)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
############################### TBB ################################
|
||||
############################### CUDA ################################
|
||||
|
||||
if (WITH_CUDA)
|
||||
find_package(CUDA)
|
||||
@@ -619,6 +623,15 @@ if (WITH_CUDA)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
############################### VideoInput ################################
|
||||
|
||||
if (WIN32 AND WITH_VIDEOINPUT)
|
||||
if(CMAKE_CXX_COMPILER MATCHES "dw2")
|
||||
else()
|
||||
set(HAVE_VIDEOINPUT 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
############################## Eigen2 ##############################
|
||||
|
||||
if(WITH_EIGEN2)
|
||||
@@ -1241,6 +1254,16 @@ message(STATUS " Video I/O: QTKit")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
message(STATUS "")
|
||||
message(STATUS " Video I/O: ")
|
||||
if(HAVE_VIDEOINPUT)
|
||||
message(STATUS " VideoInput: 1")
|
||||
else()
|
||||
message(STATUS " VideoInput: 0")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "")
|
||||
message(STATUS " Interfaces: ")
|
||||
message(STATUS " Python: ${BUILD_NEW_PYTHON_SUPPORT}")
|
||||
|
||||
Reference in New Issue
Block a user