mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
f76dd99299
Conflicts: cmake/OpenCVModule.cmake doc/tutorials/calib3d/camera_calibration/camera_calibration.rst doc/tutorials/features2d/feature_detection/feature_detection.rst doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.rst doc/tutorials/features2d/feature_homography/feature_homography.rst modules/core/include/opencv2/core/operations.hpp modules/core/src/arithm.cpp modules/gpu/perf/perf_video.cpp modules/imgproc/include/opencv2/imgproc/imgproc.hpp modules/java/generator/gen_java.py modules/java/generator/src/cpp/VideoCapture.cpp modules/nonfree/src/opencl/surf.cl modules/ocl/include/opencv2/ocl/ocl.hpp modules/ocl/perf/perf_haar.cpp modules/ocl/perf/perf_precomp.hpp modules/ocl/src/color.cpp modules/ocl/src/filtering.cpp modules/ocl/test/test_color.cpp modules/ocl/test/test_objdetect.cpp modules/python/src2/cv2.cpp samples/gpu/CMakeLists.txt samples/gpu/super_resolution.cpp
77 lines
1.9 KiB
CMake
77 lines
1.9 KiB
CMake
# ----------------------------------------------------------------------------
|
|
# Detect 3rd-party GUI libraries
|
|
# ----------------------------------------------------------------------------
|
|
|
|
#--- Win32 UI ---
|
|
ocv_clear_vars(HAVE_WIN32UI)
|
|
if(WITH_WIN32UI)
|
|
TRY_COMPILE(HAVE_WIN32UI
|
|
"${OPENCV_BINARY_DIR}/CMakeFiles/CMakeTmp"
|
|
"${OpenCV_SOURCE_DIR}/cmake/checks/win32uitest.cpp"
|
|
CMAKE_FLAGS "\"user32.lib\" \"gdi32.lib\""
|
|
OUTPUT_VARIABLE OUTPUT)
|
|
endif(WITH_WIN32UI)
|
|
|
|
# --- QT4 ---
|
|
ocv_clear_vars(HAVE_QT HAVE_QT5)
|
|
if(WITH_QT)
|
|
if(NOT WITH_QT EQUAL 4)
|
|
find_package(Qt5Core)
|
|
find_package(Qt5Gui)
|
|
find_package(Qt5Widgets)
|
|
find_package(Qt5Test)
|
|
find_package(Qt5Concurrent)
|
|
if(Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND AND Qt5Concurrent_FOUND)
|
|
set(HAVE_QT5 ON)
|
|
set(HAVE_QT ON)
|
|
find_package(Qt5OpenGL)
|
|
if(Qt5OpenGL_FOUND)
|
|
set(QT_QTOPENGL_FOUND ON)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
if(NOT HAVE_QT)
|
|
find_package(Qt4 REQUIRED QtCore QtGui QtTest)
|
|
if(QT4_FOUND)
|
|
set(HAVE_QT TRUE)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
# --- GTK ---
|
|
ocv_clear_vars(HAVE_GTK HAVE_GTHREAD HAVE_GTKGLEXT)
|
|
if(WITH_GTK AND NOT HAVE_QT)
|
|
CHECK_MODULE(gtk+-2.0 HAVE_GTK)
|
|
CHECK_MODULE(gthread-2.0 HAVE_GTHREAD)
|
|
if(WITH_OPENGL)
|
|
CHECK_MODULE(gtkglext-1.0 HAVE_GTKGLEXT)
|
|
endif()
|
|
endif()
|
|
|
|
# --- OpenGl ---
|
|
ocv_clear_vars(HAVE_OPENGL HAVE_QT_OPENGL)
|
|
if(WITH_OPENGL)
|
|
if(WITH_WIN32UI OR (HAVE_QT AND QT_QTOPENGL_FOUND) OR HAVE_GTKGLEXT)
|
|
find_package (OpenGL QUIET)
|
|
if(OPENGL_FOUND)
|
|
set(HAVE_OPENGL TRUE)
|
|
list(APPEND OPENCV_LINKER_LIBS ${OPENGL_LIBRARIES})
|
|
if(QT_QTOPENGL_FOUND)
|
|
set(HAVE_QT_OPENGL TRUE)
|
|
else()
|
|
ocv_include_directories(${OPENGL_INCLUDE_DIR})
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endif(WITH_OPENGL)
|
|
|
|
# --- Carbon & Cocoa ---
|
|
if(APPLE)
|
|
if(WITH_CARBON)
|
|
set(HAVE_CARBON YES)
|
|
elseif(NOT IOS)
|
|
set(HAVE_COCOA YES)
|
|
endif()
|
|
endif()
|