Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
0716ebb7
Commit
0716ebb7
authored
May 20, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored highgui libraries search (tested on Windows only)
parent
c9027fec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
371 additions
and
423 deletions
+371
-423
CMakeLists.txt
CMakeLists.txt
+258
-268
CMakeLists.txt
modules/highgui/CMakeLists.txt
+113
-155
No files found.
CMakeLists.txt
View file @
0716ebb7
...
@@ -117,6 +117,7 @@ OCV_OPTION(WITH_EIGEN "Include Eigen2/Eigen3 support" ON)
...
@@ -117,6 +117,7 @@ OCV_OPTION(WITH_EIGEN "Include Eigen2/Eigen3 support" ON)
OCV_OPTION
(
WITH_FFMPEG
"Include FFMPEG support"
ON
IF
(
NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_FFMPEG
"Include FFMPEG support"
ON
IF
(
NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_GSTREAMER
"Include Gstreamer support"
ON
IF
(
UNIX AND NOT APPLE AND NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_GSTREAMER
"Include Gstreamer support"
ON
IF
(
UNIX AND NOT APPLE AND NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_GTK
"Include GTK support"
ON
IF
(
UNIX AND NOT APPLE AND NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_GTK
"Include GTK support"
ON
IF
(
UNIX AND NOT APPLE AND NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_IMAGEIO
"ImageIO support for OS X"
OFF IF APPLE
)
OCV_OPTION
(
WITH_IPP
"Include Intel IPP support"
OFF
IF
(
MSVC OR X86 OR X86_64
)
)
OCV_OPTION
(
WITH_IPP
"Include Intel IPP support"
OFF
IF
(
MSVC OR X86 OR X86_64
)
)
OCV_OPTION
(
WITH_JASPER
"Include JPEG2K support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_JASPER
"Include JPEG2K support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_JPEG
"Include JPEG support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_JPEG
"Include JPEG support"
ON
IF
(
NOT IOS
)
)
...
@@ -134,7 +135,7 @@ OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
...
@@ -134,7 +135,7 @@ OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
OCV_OPTION
(
WITH_VIDEOINPUT
"Build HighGUI with DirectShow support"
ON IF WIN32
)
OCV_OPTION
(
WITH_VIDEOINPUT
"Build HighGUI with DirectShow support"
ON IF WIN32
)
OCV_OPTION
(
WITH_XIMEA
"Include XIMEA cameras support"
OFF IF WIN32
)
OCV_OPTION
(
WITH_XIMEA
"Include XIMEA cameras support"
OFF IF WIN32
)
OCV_OPTION
(
WITH_XINE
"Include Xine support (GPL)"
OFF
IF
(
UNIX AND NOT APPLE AND NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_XINE
"Include Xine support (GPL)"
OFF
IF
(
UNIX AND NOT APPLE AND NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_CLP
"Include Clp support (EPL)"
OFF
IF
(
NOT ANDROID AND NOT IOS
)
)
OCV_OPTION
(
WITH_CLP
"Include Clp support (EPL)"
OFF
)
# OpenCV build components
# OpenCV build components
# ===================================================
# ===================================================
...
@@ -311,263 +312,259 @@ if(UNIX)
...
@@ -311,263 +312,259 @@ if(UNIX)
include
(
cmake/OpenCVFindPkgConfig.cmake OPTIONAL
)
include
(
cmake/OpenCVFindPkgConfig.cmake OPTIONAL
)
include
(
CheckFunctionExists
)
include
(
CheckFunctionExists
)
include
(
CheckIncludeFile
)
include
(
CheckIncludeFile
)
if
(
NOT APPLE
)
CHECK_INCLUDE_FILE
(
alloca.h HAVE_ALLOCA_H
)
CHECK_FUNCTION_EXISTS
(
alloca HAVE_ALLOCA
)
CHECK_INCLUDE_FILE
(
unistd.h HAVE_UNISTD_H
)
CHECK_INCLUDE_FILE
(
pthread.h HAVE_LIBPTHREAD
)
if
(
ANDROID
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
dl m log
)
elseif
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"FreeBSD"
OR
${
CMAKE_SYSTEM_NAME
}
MATCHES
"NetBSD"
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
m pthread
)
else
()
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
dl m pthread rt
)
endif
()
else
()
add_definitions
(
-DHAVE_ALLOCA -DHAVE_ALLOCA_H -DHAVE_LIBPTHREAD -DHAVE_UNISTD_H
)
endif
()
endif
()
endif
()
include
(
cmake/OpenCVPCHSupport.cmake REQUIRED
)
include
(
cmake/OpenCVPCHSupport.cmake REQUIRED
)
include
(
cmake/OpenCVModule.cmake REQUIRED
)
include
(
cmake/OpenCVModule.cmake REQUIRED
)
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Detect 3rd-party
tools and
libraries
# Detect 3rd-party
image IO
libraries
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# IO libraries
include
(
cmake/OpenCVIOLibs.cmake REQUIRED
)
include
(
cmake/OpenCVIOLibs.cmake REQUIRED
)
#Graphic libraries
# ----------------------------------------------------------------------------
set
(
HAVE_OPENGL 0
)
# Detect 3rd-party GUI libraries
if
(
UNIX
)
# ----------------------------------------------------------------------------
if
(
NOT APPLE
)
# --- QT4 ---
if
(
WITH_GTK
)
ocv_clear_vars
(
HAVE_QT
)
CHECK_MODULE
(
gtk+-2.0 HAVE_GTK
)
if
(
WITH_QT
)
CHECK_MODULE
(
gthread-2.0 HAVE_GTHREAD
)
find_package
(
Qt4
)
if
(
WITH_OPENGL
)
if
(
QT4_FOUND
)
CHECK_MODULE
(
gtkglext-1.0 HAVE_GTKGLEXT
)
set
(
HAVE_QT TRUE
)
if
(
HAVE_GTKGLEXT
)
add_definitions
(
-DHAVE_QT
)
#We need to define te macro this way, using cvconfig.h.cmake does not work
find_package
(
OpenGL QUIET
)
endif
()
if
(
OPENGL_FOUND
)
endif
()
set
(
HAVE_OPENGL 1
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
${
OPENGL_LIBRARIES
}
)
# --- GTK ---
ocv_include_directories
(
${
OPENGL_INCLUDE_DIR
}
)
ocv_clear_vars
(
HAVE_GTK HAVE_GTHREAD HAVE_GTKGLEXT
)
endif
()
if
(
WITH_GTK AND NOT HAVE_QT
)
endif
()
CHECK_MODULE
(
gtk+-2.0 HAVE_GTK
)
endif
()
CHECK_MODULE
(
gthread-2.0 HAVE_GTHREAD
)
else
()
if
(
WITH_OPENGL
)
set
(
HAVE_GTK FALSE
)
CHECK_MODULE
(
gtkglext-1.0 HAVE_GTKGLEXT
)
set
(
HAVE_GTHREAD FALSE
)
endif
()
endif
()
endif
()
if
(
WITH_GSTREAMER
)
CHECK_MODULE
(
gstreamer-base-0.10 HAVE_GSTREAMER
)
# --- OpenGl ---
CHECK_MODULE
(
gstreamer-app-0.10 HAVE_GSTREAMER
)
ocv_clear_vars
(
HAVE_OPENGL HAVE_QT_OPENGL
)
CHECK_MODULE
(
gstreamer-video-0.10 HAVE_GSTREAMER
)
if
(
WITH_OPENGL
)
if
(
WIN32 OR QT_QTOPENGL_FOUND OR HAVE_GTKGLEXT
)
find_package
(
OpenGL QUIET
)
if
(
OPENGL_FOUND
)
set
(
HAVE_OPENGL TRUE
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
${
OPENGL_LIBRARIES
}
)
if
(
QT_QTOPENGL_FOUND
)
set
(
HAVE_QT_OPENGL TRUE
)
add_definitions
(
-DHAVE_QT_OPENGL
)
else
()
else
()
set
(
HAVE_GSTREAMER FALSE
)
ocv_include_directories
(
${
OPENGL_INCLUDE_DIR
}
)
endif
()
endif
()
endif
()
endif
()
endif
()
endif
(
WITH_OPENGL
)
if
(
WITH_UNICAP
)
# ----------------------------------------------------------------------------
CHECK_MODULE
(
libunicap HAVE_UNICAP_
)
# Detect 3rd-party video IO libraries
CHECK_MODULE
(
libucil HAVE_UNICAP_UCIL
)
# ----------------------------------------------------------------------------
if
(
HAVE_UNICAP_ AND HAVE_UNICAP_UCIL
)
# --- GStreamer ---
set
(
HAVE_UNICAP 1
)
ocv_clear_vars
(
HAVE_GSTREAMER
)
endif
()
if
(
WITH_GSTREAMER
)
else
()
CHECK_MODULE
(
gstreamer-base-0.10 HAVE_GSTREAMER
)
set
(
HAVE_UNICAP FALSE
)
if
(
HAVE_GSTREAMER
)
endif
()
CHECK_MODULE
(
gstreamer-app-0.10 HAVE_GSTREAMER
)
endif
()
if
(
HAVE_GSTREAMER
)
CHECK_MODULE
(
gstreamer-video-0.10 HAVE_GSTREAMER
)
endif
()
endif
(
WITH_GSTREAMER
)
# --- unicap ---
ocv_clear_vars
(
HAVE_UNICAP
)
if
(
WITH_UNICAP
)
CHECK_MODULE
(
libunicap HAVE_UNICAP_
)
CHECK_MODULE
(
libucil HAVE_UNICAP_UCIL
)
if
(
HAVE_UNICAP_ AND HAVE_UNICAP_UCIL
)
set
(
HAVE_UNICAP TRUE
)
endif
()
endif
(
WITH_UNICAP
)
# --- PvApi ---
ocv_clear_vars
(
HAVE_PVAPI
)
if
(
WITH_PVAPI
)
find_path
(
PVAPI_INCLUDE_PATH
"PvApi.h"
PATHS
"/usr/local/include"
"/usr/include"
DOC
"The path to PvAPI header"
)
if
(
PVAPI_INCLUDE_PATH
)
set
(
HAVE_PVAPI TRUE
)
endif
()
endif
(
WITH_PVAPI
)
# --- Dc1394 ---
ocv_clear_vars
(
HAVE_DC1394 HAVE_DC1394_2
)
if
(
WITH_1394
)
CHECK_MODULE
(
libdc1394-2 HAVE_DC1394_2
)
if
(
NOT HAVE_DC1394_2
)
CHECK_MODULE
(
libdc1394 HAVE_DC1394
)
endif
()
endif
(
WITH_1394
)
# --- xine ---
ocv_clear_vars
(
HAVE_XINE
)
if
(
WITH_XINE
)
CHECK_MODULE
(
libxine HAVE_XINE
)
endif
(
WITH_XINE
)
# --- V4L ---
ocv_clear_vars
(
HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2
)
if
(
WITH_V4L
)
CHECK_MODULE
(
libv4l1 HAVE_LIBV4L
)
CHECK_INCLUDE_FILE
(
linux/videodev.h HAVE_CAMV4L
)
CHECK_INCLUDE_FILE
(
linux/videodev2.h HAVE_CAMV4L2
)
endif
(
WITH_V4L
)
# --- OpenNI ---
ocv_clear_vars
(
HAVE_OPENNI HAVE_OPENNI_PRIME_SENSOR_MODULE
)
if
(
WITH_OPENNI
)
include
(
cmake/OpenCVFindOpenNI.cmake
)
endif
(
WITH_OPENNI
)
if
(
WITH_PVAPI
)
# --- XIMEA ---
find_path
(
PVAPI_INCLUDE_PATH
"PvApi.h"
ocv_clear_vars
(
HAVE_XIMEA
)
PATHS
"/usr/local/include"
"/usr/include"
if
(
WITH_XIMEA
)
DOC
"The path to PvAPI header"
)
include
(
cmake/OpenCVFindXimea.cmake
)
if
(
PVAPI_INCLUDE_PATH
)
if
(
XIMEA_FOUND
)
set
(
HAVE_PVAPI 1
)
set
(
HAVE_XIMEA TRUE
)
endif
()
endif
()
endif
(
)
endif
(
WITH_XIMEA
)
set
(
HAVE_FFMPEG 0
)
# --- FFMPEG ---
if
(
WITH_FFMPEG
)
ocv_clear_vars
(
HAVE_FFMPEG HAVE_FFMPEG_CODEC HAVE_FFMPEG_FORMAT HAVE_FFMPEG_UTIL HAVE_FFMPEG_SWSCALE HAVE_GENTOO_FFMPEG HAVE_FFMPEG_FFMPEG
)
CHECK_MODULE
(
libavcodec HAVE_FFMPEG_CODEC
)
if
(
WITH_FFMPEG
)
CHECK_MODULE
(
libavformat HAVE_FFMPEG_FORMAT
)
if
(
WIN32
)
CHECK_MODULE
(
libavutil HAVE_FFMPEG_UTIL
)
include
(
3rdparty/ffmpeg/ffmpeg_version.cmake REQUIRED
)
CHECK_MODULE
(
libswscale HAVE_FFMPEG_SWSCALE
)
elseif
(
UNIX
)
CHECK_INCLUDE_FILE
(
libavformat/avformat.h HAVE_GENTOO_FFMPEG
)
CHECK_MODULE
(
libavcodec HAVE_FFMPEG_CODEC
)
CHECK_INCLUDE_FILE
(
ffmpeg/avformat.h HAVE_FFMPEG_FFMPEG
)
CHECK_MODULE
(
libavformat HAVE_FFMPEG_FORMAT
)
if
(
NOT HAVE_GENTOO_FFMPEG AND NOT HAVE_FFMPEG_FFMPEG
)
CHECK_MODULE
(
libavutil HAVE_FFMPEG_UTIL
)
if
(
EXISTS /usr/include/ffmpeg/libavformat/avformat.h OR HAVE_FFMPEG_SWSCALE
)
CHECK_MODULE
(
libswscale HAVE_FFMPEG_SWSCALE
)
set
(
HAVE_GENTOO_FFMPEG 1
)
endif
()
CHECK_INCLUDE_FILE
(
libavformat/avformat.h HAVE_GENTOO_FFMPEG
)
endif
()
CHECK_INCLUDE_FILE
(
ffmpeg/avformat.h HAVE_FFMPEG_FFMPEG
)
if
(
HAVE_FFMPEG_CODEC AND HAVE_FFMPEG_FORMAT AND HAVE_FFMPEG_UTIL
)
if
(
NOT HAVE_GENTOO_FFMPEG AND NOT HAVE_FFMPEG_FFMPEG
)
if
(
HAVE_FFMPEG_SWSCALE
)
if
(
EXISTS /usr/include/ffmpeg/libavformat/avformat.h OR HAVE_FFMPEG_SWSCALE
)
set
(
HAVE_FFMPEG 1
)
set
(
HAVE_GENTOO_FFMPEG TRUE
)
endif
()
endif
()
endif
()
endif
()
if
(
HAVE_FFMPEG_CODEC AND HAVE_FFMPEG_FORMAT AND HAVE_FFMPEG_UTIL AND HAVE_FFMPEG_SWSCALE
)
set
(
HAVE_FFMPEG TRUE
)
endif
()
if
(
HAVE_FFMPEG
)
# Find the bzip2 library because it is required on some systems
# Find the bzip2 library because it is required on some systems
FIND_LIBRARY
(
BZIP2_LIBRARIES NAMES bz2 bzip2
)
FIND_LIBRARY
(
BZIP2_LIBRARIES NAMES bz2 bzip2
)
if
(
NOT BZIP2_LIBRARIES
)
if
(
NOT BZIP2_LIBRARIES
)
# Do an other trial
# Do an other trial
FIND_FILE
(
BZIP2_LIBRARIES NAMES libbz2.so.1 PATHS /lib
)
FIND_FILE
(
BZIP2_LIBRARIES NAMES libbz2.so.1 PATHS /lib
)
endif
()
endif
()
endif
()
endif
(
HAVE_FFMPEG
)
endif
()
if
(
WITH_1394
)
CHECK_MODULE
(
libdc1394-2 HAVE_DC1394_2
)
if
(
NOT HAVE_DC1394_2
)
CHECK_MODULE
(
libdc1394 HAVE_DC1394
)
endif
()
else
()
set
(
HAVE_DC1394_2 FALSE
)
set
(
HAVE_DC1394 FALSE
)
endif
()
if
(
NOT APPLE
)
CHECK_INCLUDE_FILE
(
alloca.h HAVE_ALLOCA_H
)
CHECK_FUNCTION_EXISTS
(
alloca HAVE_ALLOCA
)
CHECK_INCLUDE_FILE
(
unistd.h HAVE_UNISTD_H
)
CHECK_INCLUDE_FILE
(
pthread.h HAVE_LIBPTHREAD
)
if
(
WITH_XINE
)
CHECK_MODULE
(
libxine HAVE_XINE
)
else
()
set
(
HAVE_XINE FALSE
)
endif
()
if
(
WITH_V4L
)
CHECK_MODULE
(
libv4l1 HAVE_LIBV4L
)
CHECK_INCLUDE_FILE
(
linux/videodev.h HAVE_CAMV4L
)
CHECK_INCLUDE_FILE
(
linux/videodev2.h HAVE_CAMV4L2
)
else
()
set
(
HAVE_LIBV4L FALSE
)
set
(
HAVE_CAMV4L FALSE
)
set
(
HAVE_CAMV4L2 FALSE
)
endif
()
if
(
ANDROID
)
if
(
APPLE
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
dl m log
)
find_path
(
FFMPEG_INCLUDE_DIR
"libavformat/avformat.h"
elseif
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"FreeBSD"
OR
${
CMAKE_SYSTEM_NAME
}
MATCHES
"NetBSD"
)
PATHS /usr/local /usr /opt
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
m pthread
)
PATH_SUFFIXES include
else
()
DOC
"The path to FFMPEG headers"
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
dl m pthread rt
)
if
(
FFMPEG_INCLUDE_DIR
)
set
(
HAVE_GENTOO_FFMPEG TRUE
)
set
(
FFMPEG_LIB_DIR
"
${
FFMPEG_INCLUDE_DIR
}
/../lib"
CACHE PATH
"Full path of FFMPEG library directory"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavcodec.a"
)
set
(
HAVE_FFMPEG_CODEC 1
)
set
(
ALIASOF_libavcodec_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavformat.a"
)
set
(
HAVE_FFMPEG_FORMAT 1
)
set
(
ALIASOF_libavformat_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavutil.a"
)
set
(
HAVE_FFMPEG_UTIL 1
)
set
(
ALIASOF_libavutil_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libswscale.a"
)
set
(
HAVE_FFMPEG_SWSCALE 1
)
set
(
ALIASOF_libswscale_VERSION
"Unknown"
)
set
(
HAVE_FFMPEG 1
)
endif
()
endif
()
endif
()
endif
()
else
()
endif
()
add_definitions
(
-DHAVE_ALLOCA -DHAVE_ALLOCA_H -DHAVE_LIBPTHREAD -DHAVE_UNISTD_H
)
endif
(
FFMPEG_INCLUDE_DIR
)
endif
()
if
(
HAVE_FFMPEG
)
endif
()
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
"
${
FFMPEG_LIB_DIR
}
/libavcodec.a"
"
${
FFMPEG_LIB_DIR
}
/libavformat.a"
"
${
FFMPEG_LIB_DIR
}
/libavutil.a"
if
(
APPLE AND WITH_FFMPEG
)
"
${
FFMPEG_LIB_DIR
}
/libswscale.a"
)
set
(
FFMPEG_DEFAULT_INCLUDE_DIRS
"/usr/local/include/"
"/usr/include/"
"opt/include/"
)
ocv_include_directories
(
${
FFMPEG_INCLUDE_DIR
}
)
find_path
(
FFMPEG_INCLUDE_DIR
"libavformat/avformat.h"
PATHS
${
FFMPEG_DEFAULT_INCLUDE_DIRS
}
DOC
"The path to FFMPEG headers"
)
if
(
FFMPEG_INCLUDE_DIR
)
set
(
HAVE_GENTOO_FFMPEG 1
)
set
(
FFMPEG_LIB_DIR
"
${
FFMPEG_INCLUDE_DIR
}
/../lib"
CACHE PATH
"Full path of FFMPEG library directory"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavcodec.a"
)
set
(
HAVE_FFMPEG_CODEC 1
)
set
(
ALIASOF_libavcodec_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavformat.a"
)
set
(
HAVE_FFMPEG_FORMAT 1
)
set
(
ALIASOF_libavformat_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libavutil.a"
)
set
(
HAVE_FFMPEG_UTIL 1
)
set
(
ALIASOF_libavutil_VERSION
"Unknown"
)
if
(
EXISTS
"
${
FFMPEG_LIB_DIR
}
/libswscale.a"
)
ocv_include_directories
(
${
FFMPEG_INCLUDE_DIR
}
)
set
(
HAVE_FFMPEG_SWSCALE 1
)
set
(
ALIASOF_libswscale_VERSION
"Unknown"
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
"
${
FFMPEG_LIB_DIR
}
/libavcodec.a"
"
${
FFMPEG_LIB_DIR
}
/libavformat.a"
"
${
FFMPEG_LIB_DIR
}
/libavutil.a"
"
${
FFMPEG_LIB_DIR
}
/libswscale.a"
)
set
(
HAVE_FFMPEG 1
)
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
endif
(
APPLE
)
endif
()
endif
(
WITH_FFMPEG
)
if
(
WIN32 AND WITH_FFMPEG
)
# --- VideoInput ---
include
(
3rdparty/ffmpeg/ffmpeg_version.cmake REQUIRED
)
if
(
WITH_VIDEOINPUT
)
endif
()
# always have VideoInput on Windows
set
(
HAVE_VIDEOINPUT 1
)
#################### LATEX for dpf documentation ##################
endif
(
WITH_VIDEOINPUT
)
if
(
BUILD_DOCS
)
include
(
cmake/OpenCVFindLATEX.cmake REQUIRED
)
endif
()
########################## Python Support #########################
# --- Extra HighGUI libs on Windows ---
include
(
cmake/OpenCVDetectPython.cmake REQUIRED
)
if
(
WIN32
)
list
(
APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32
)
########################### Java Support ##########################
if
(
MSVC
)
if
(
ANDROID
)
list
(
APPEND HIGHGUI_LIBRARIES vfw32
)
include
(
cmake/OpenCVDetectApacheAnt.cmake REQUIRED
)
elseif
(
MINGW64
)
include
(
cmake/OpenCVDetectAndroidSDK.cmake REQUIRED
)
list
(
APPEND HIGHGUI_LIBRARIES msvfw32 avifil32 avicap32 winmm
)
elseif
(
MINGW
)
if
(
NOT ANDROID_TOOLS_Pkg_Revision GREATER 13
)
list
(
APPEND HIGHGUI_LIBRARIES vfw32 winmm
)
message
(
WARNING
"OpenCV requires Android SDK tools revision 14 or newer. Otherwise tests and samples will no be compiled."
)
endif
()
endif
()
endif
()
endif
(
WIN32
)
if
(
ANDROID AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE
AND
(
ANT_VERSION VERSION_GREATER 1.7
)
AND
(
ANDROID_TOOLS_Pkg_Revision GREATER 13
))
SET
(
CAN_BUILD_ANDROID_PROJECTS TRUE
)
else
()
SET
(
CAN_BUILD_ANDROID_PROJECTS FALSE
)
endif
()
############################### QT ################################
set
(
HAVE_QT 0
)
set
(
HAVE_QT_OPENGL 0
)
if
(
WITH_QT
)
find_package
(
Qt4
)
if
(
QT4_FOUND
)
set
(
HAVE_QT 1
)
add_definitions
(
-DHAVE_QT
)
#We need to define te macro this way, using cvconfig.h.cmake does not work
if
(
WITH_OPENGL
)
find_package
(
OpenGL QUIET
)
if
(
QT_QTOPENGL_FOUND AND OPENGL_FOUND
)
set
(
HAVE_OPENGL 1
)
set
(
HAVE_QT_OPENGL 1
)
add_definitions
(
-DHAVE_QT_OPENGL
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
${
OPENGL_LIBRARIES
}
)
endif
()
endif
()
endif
()
endif
()
############################### TBB ################################
# ----------------------------------------------------------------------------
# Detect other 3rd-party libraries/tools
# ----------------------------------------------------------------------------
# --- TBB ---
if
(
WITH_TBB
)
if
(
WITH_TBB
)
include
(
cmake/OpenCVDetectTBB.cmake REQUIRED
)
include
(
cmake/OpenCVDetectTBB.cmake REQUIRED
)
endif
()
endif
(
WITH_TBB
)
############################ Intel IPP #############################
set
(
IPP_FOUND
)
# --- IPP ---
ocv_clear_vars
(
IPP_FOUND
)
if
(
WITH_IPP
)
if
(
WITH_IPP
)
include
(
cmake/OpenCVFindIPP.cmake
)
include
(
cmake/OpenCVFindIPP.cmake
)
endif
()
if
(
IPP_FOUND
)
add_definitions
(
-DHAVE_IPP
)
if
(
IPP_FOUND
)
ocv_include_directories
(
${
IPP_INCLUDE_DIRS
}
)
add_definitions
(
-DHAVE_IPP
)
link_directories
(
${
IPP_LIBRARY_DIRS
}
)
ocv_include_directories
(
${
IPP_INCLUDE_DIRS
}
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBRARIES
}
)
link_directories
(
${
IPP_LIBRARY_DIRS
}
)
endif
()
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBRARIES
}
)
endif
(
WITH_IPP
)
endif
()
#
############################## CUDA ################################
#
--- CUDA ---
if
(
WITH_CUDA
)
if
(
WITH_CUDA
)
include
(
cmake/OpenCVDetectCUDA.cmake REQUIRED
)
include
(
cmake/OpenCVDetectCUDA.cmake REQUIRED
)
endif
()
endif
(
WITH_CUDA
)
############################### OpenNI ################################
set
(
HAVE_OPENNI FALSE
)
set
(
HAVE_OPENNI_PRIME_SENSOR_MODULE FALSE
)
if
(
WITH_OPENNI
)
include
(
cmake/OpenCVFindOpenNI.cmake
)
endif
()
############################### XIMEA ################################
set
(
HAVE_XIMEA FALSE
)
if
(
WITH_XIMEA
)
include
(
cmake/OpenCVFindXimea.cmake
)
endif
()
if
(
XIMEA_FOUND
)
# --- Eigen ---
set
(
HAVE_XIMEA TRUE
)
endif
()
############################## Eigen ##############################
if
(
WITH_EIGEN
)
if
(
WITH_EIGEN
)
find_path
(
EIGEN_INCLUDE_PATH
"Eigen/Core"
find_path
(
EIGEN_INCLUDE_PATH
"Eigen/Core"
PATHS /usr/local /opt /usr ENV ProgramFiles ENV ProgramW6432
PATHS /usr/local /opt /usr ENV ProgramFiles ENV ProgramW6432
...
@@ -579,13 +576,11 @@ if(WITH_EIGEN)
...
@@ -579,13 +576,11 @@ if(WITH_EIGEN)
ocv_parse_header
(
"
${
EIGEN_INCLUDE_PATH
}
/Eigen/src/Core/util/Macros.h"
EIGEN_VERSION_LINES EIGEN_WORLD_VERSION EIGEN_MAJOR_VERSION EIGEN_MINOR_VERSION
)
ocv_parse_header
(
"
${
EIGEN_INCLUDE_PATH
}
/Eigen/src/Core/util/Macros.h"
EIGEN_VERSION_LINES EIGEN_WORLD_VERSION EIGEN_MAJOR_VERSION EIGEN_MINOR_VERSION
)
set
(
HAVE_EIGEN 1
)
set
(
HAVE_EIGEN 1
)
endif
()
endif
()
endif
()
endif
(
WITH_EIGEN
)
########################## Clp #####################################
set
(
HAVE_CLP FALSE
)
# --- Clp ---
ocv_clear_vars
(
HAVE_CLP
)
if
(
WITH_CLP
)
if
(
WITH_CLP
)
if
(
UNIX
)
if
(
UNIX
)
PKG_CHECK_MODULES
(
CLP clp
)
PKG_CHECK_MODULES
(
CLP clp
)
if
(
CLP_FOUND
)
if
(
CLP_FOUND
)
...
@@ -614,38 +609,30 @@ if(WITH_CLP)
...
@@ -614,38 +609,30 @@ if(WITH_CLP)
set
(
HAVE_CLP TRUE
)
set
(
HAVE_CLP TRUE
)
endif
()
endif
()
endif
()
endif
()
endif
(
WITH_CLP
)
endif
()
################## Extra HighGUI libs on Windows ###################
if
(
WIN32
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
comctl32 gdi32 ole32
)
if
(
WITH_VIDEOINPUT
)
# --- LATEX for pdf documentation ---
set
(
HAVE_VIDEOINPUT 1
)
if
(
BUILD_DOCS
)
endif
()
include
(
cmake/OpenCVFindLATEX.cmake REQUIRED
)
endif
(
BUILD_DOCS
)
if
(
MSVC
)
# --- Python Support ---
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
vfw32
)
include
(
cmake/OpenCVDetectPython.cmake REQUIRED
)
endif
()
if
(
MINGW
)
# --- Java Support ---
if
(
MINGW64
)
if
(
ANDROID
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
msvfw32 avifil32 avicap32 winmm
)
include
(
cmake/OpenCVDetectApacheAnt.cmake REQUIRED
)
else
()
include
(
cmake/OpenCVDetectAndroidSDK.cmake REQUIRED
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
vfw32 winmm
)
endif
()
if
(
NOT ANDROID_TOOLS_Pkg_Revision GREATER 13
)
message
(
WARNING
"OpenCV requires Android SDK tools revision 14 or newer. Otherwise tests and samples will no be compiled."
)
endif
()
endif
()
endif
(
ANDROID
)
if
(
WITH_OPENGL AND NOT HAVE_QT_OPENGL
)
if
(
ANDROID AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE
AND
(
ANT_VERSION VERSION_GREATER 1.7
)
AND
(
ANDROID_TOOLS_Pkg_Revision GREATER 13
))
find_package
(
OpenGL QUIET
)
SET
(
CAN_BUILD_ANDROID_PROJECTS TRUE
)
else
()
if
(
OPENGL_FOUND
)
SET
(
CAN_BUILD_ANDROID_PROJECTS FALSE
)
set
(
HAVE_OPENGL 1
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
${
OPENGL_LIBRARIES
}
)
ocv_include_directories
(
${
OPENGL_INCLUDE_DIR
}
)
endif
()
endif
()
endif
()
endif
()
...
@@ -769,10 +756,10 @@ foreach(m ${OPENCV_MODULES_DISABLED_AUTO})
...
@@ -769,10 +756,10 @@ foreach(m ${OPENCV_MODULES_DISABLED_AUTO})
endforeach
()
endforeach
()
string
(
REPLACE
"opencv_"
""
OPENCV_MODULES_DISABLED_AUTO_ST
"
${
OPENCV_MODULES_DISABLED_AUTO_ST
}
"
)
string
(
REPLACE
"opencv_"
""
OPENCV_MODULES_DISABLED_AUTO_ST
"
${
OPENCV_MODULES_DISABLED_AUTO_ST
}
"
)
status
(
" To be built:"
OPENCV_MODULES_BUILD THEN
${
OPENCV_MODULES_BUILD_ST
}
ELSE
"-"
)
status
(
" To be built:"
OPENCV_MODULES_BUILD THEN
${
OPENCV_MODULES_BUILD_ST
}
ELSE
"-"
)
status
(
" Disabled:"
OPENCV_MODULES_DISABLED_USER THEN
${
OPENCV_MODULES_DISABLED_USER_ST
}
ELSE
"-"
)
status
(
" Disabled:"
OPENCV_MODULES_DISABLED_USER THEN
${
OPENCV_MODULES_DISABLED_USER_ST
}
ELSE
"-"
)
status
(
" Disabled by dependency:"
OPENCV_MODULES_DISABLED_AUTO THEN
${
OPENCV_MODULES_DISABLED_AUTO_ST
}
ELSE
"-"
)
status
(
" Disabled by dependency:"
OPENCV_MODULES_DISABLED_AUTO THEN
${
OPENCV_MODULES_DISABLED_AUTO_ST
}
ELSE
"-"
)
status
(
" Unavailable
on this platform:"
OPENCV_MODULES_DISABLED_FORCE THEN
${
OPENCV_MODULES_DISABLED_FORCE_ST
}
ELSE
"-"
)
status
(
" Unavailable
:"
OPENCV_MODULES_DISABLED_FORCE THEN
${
OPENCV_MODULES_DISABLED_FORCE_ST
}
ELSE
"-"
)
# ========================== Android details ==========================
# ========================== Android details ==========================
if
(
ANDROID
)
if
(
ANDROID
)
...
@@ -948,15 +935,23 @@ endif(DEFINED WITH_XINE)
...
@@ -948,15 +935,23 @@ endif(DEFINED WITH_XINE)
status
(
""
)
status
(
""
)
status
(
" Other third-party libraries:"
)
status
(
" Other third-party libraries:"
)
if
(
WITH_IPP AND IPP_FOUND
)
if
(
DEFINED WITH_IPP
)
status
(
" Use IPP:"
"
${
IPP_LATEST_VERSION_STR
}
[
${
IPP_LATEST_VERSION_MAJOR
}
.
${
IPP_LATEST_VERSION_MINOR
}
.
${
IPP_LATEST_VERSION_BUILD
}
]"
)
if
(
WITH_IPP AND IPP_FOUND
)
status
(
" at:"
"
${
IPP_ROOT_DIR
}
"
)
status
(
" Use IPP:"
"
${
IPP_LATEST_VERSION_STR
}
[
${
IPP_LATEST_VERSION_MAJOR
}
.
${
IPP_LATEST_VERSION_MINOR
}
.
${
IPP_LATEST_VERSION_BUILD
}
]"
)
else
()
status
(
" at:"
"
${
IPP_ROOT_DIR
}
"
)
status
(
" Use IPP:"
WITH_IPP AND NOT IPP_FOUND THEN
"IPP not found"
ELSE NO
)
else
()
endif
()
status
(
" Use IPP:"
WITH_IPP AND NOT IPP_FOUND THEN
"IPP not found"
ELSE NO
)
endif
()
endif
(
DEFINED WITH_IPP
)
if
(
DEFINED WITH_TBB
)
status
(
" Use TBB:"
HAVE_TBB THEN
"YES (ver
${
TBB_VERSION_MAJOR
}
.
${
TBB_VERSION_MINOR
}
interface
${
TBB_INTERFACE_VERSION
}
)"
ELSE NO
)
endif
(
DEFINED WITH_TBB
)
if
(
DEFINED WITH_CUDA
)
status
(
" Use Cuda:"
HAVE_CUDA THEN
"YES (ver
${
CUDA_VERSION_STRING
}
)"
ELSE NO
)
endif
(
DEFINED WITH_CUDA
)
status
(
" Use TBB:"
HAVE_TBB THEN
"YES (ver
${
TBB_VERSION_MAJOR
}
.
${
TBB_VERSION_MINOR
}
interface
${
TBB_INTERFACE_VERSION
}
)"
ELSE NO
)
status
(
" Use Cuda:"
HAVE_CUDA THEN
"YES (ver
${
CUDA_VERSION_STRING
}
)"
ELSE NO
)
status
(
" Use Eigen:"
HAVE_EIGEN THEN
"YES (ver
${
EIGEN_WORLD_VERSION
}
.
${
EIGEN_MAJOR_VERSION
}
.
${
EIGEN_MINOR_VERSION
}
)"
ELSE NO
)
status
(
" Use Eigen:"
HAVE_EIGEN THEN
"YES (ver
${
EIGEN_WORLD_VERSION
}
.
${
EIGEN_MAJOR_VERSION
}
.
${
EIGEN_MINOR_VERSION
}
)"
ELSE NO
)
status
(
" Use Clp:"
HAVE_CLP THEN YES ELSE NO
)
status
(
" Use Clp:"
HAVE_CLP THEN YES ELSE NO
)
...
@@ -971,7 +966,7 @@ if(HAVE_CUDA)
...
@@ -971,7 +966,7 @@ if(HAVE_CUDA)
status
(
" NVIDIA GPU features:"
${
OPENCV_CUDA_ARCH_FEATURES
}
)
status
(
" NVIDIA GPU features:"
${
OPENCV_CUDA_ARCH_FEATURES
}
)
endif
()
endif
()
# ==========================
interfaces to languages
==========================
# ==========================
python
==========================
status
(
""
)
status
(
""
)
status
(
" Python:"
)
status
(
" Python:"
)
status
(
" Interpreter:"
PYTHON_EXECUTABLE THEN
"
${
PYTHON_EXECUTABLE
}
(ver
${
PYTHON_VERSION_FULL
}
)"
ELSE NO
)
status
(
" Interpreter:"
PYTHON_EXECUTABLE THEN
"
${
PYTHON_EXECUTABLE
}
(ver
${
PYTHON_VERSION_FULL
}
)"
ELSE NO
)
...
@@ -985,11 +980,6 @@ if(BUILD_opencv_python)
...
@@ -985,11 +980,6 @@ if(BUILD_opencv_python)
status
(
" packages path:"
PYTHON_EXECUTABLE THEN
"
${
PYTHON_PACKAGES_PATH
}
"
ELSE
"-"
)
status
(
" packages path:"
PYTHON_EXECUTABLE THEN
"
${
PYTHON_PACKAGES_PATH
}
"
ELSE
"-"
)
endif
()
endif
()
if
(
BUILD_opencv_java
)
status
(
""
)
status
(
" Java:"
HAVE_opencv_java THEN YES ELSE NO
)
endif
()
# ========================== documentation ==========================
# ========================== documentation ==========================
if
(
BUILD_DOCS
)
if
(
BUILD_DOCS
)
status
(
""
)
status
(
""
)
...
...
modules/highgui/CMakeLists.txt
View file @
0716ebb7
...
@@ -7,52 +7,56 @@ ocv_add_module(highgui opencv_imgproc OPTIONAL opencv_androidcamera)
...
@@ -7,52 +7,56 @@ ocv_add_module(highgui opencv_imgproc OPTIONAL opencv_androidcamera)
# Jose Luis Blanco, 2008
# Jose Luis Blanco, 2008
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
set
(
GRFMT_LIBS
""
)
ocv_clear_vars
(
GRFMT_LIBS
)
if
(
WITH_PNG OR WITH_TIFF OR WITH_OPENEXR
)
if
(
WITH_PNG OR WITH_TIFF OR WITH_OPENEXR
)
ocv_include_directories
(
${
ZLIB_INCLUDE_DIR
}
)
ocv_include_directories
(
${
ZLIB_INCLUDE_DIR
}
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
${
ZLIB_LIBRARIES
}
)
list
(
APPEND GRFMT_LIBS
${
ZLIB_LIBRARIES
}
)
endif
()
endif
()
if
(
WITH_JPEG
)
if
(
WITH_JPEG
)
add_definitions
(
-DHAVE_JPEG
)
add_definitions
(
-DHAVE_JPEG
)
ocv_include_directories
(
${
JPEG_INCLUDE_DIR
}
)
ocv_include_directories
(
${
JPEG_INCLUDE_DIR
}
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
${
JPEG_LIBRARIES
}
)
list
(
APPEND GRFMT_LIBS
${
JPEG_LIBRARIES
}
)
endif
()
endif
()
if
(
WITH_PNG
)
if
(
WITH_PNG
)
add_definitions
(
-DHAVE_PNG
)
add_definitions
(
-DHAVE_PNG
)
add_definitions
(
${
PNG_DEFINITIONS
}
)
add_definitions
(
${
PNG_DEFINITIONS
}
)
ocv_include_directories
(
${
PNG_INCLUDE_DIR
}
)
ocv_include_directories
(
${
PNG_INCLUDE_DIR
}
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
${
PNG_LIBRARIES
}
)
list
(
APPEND GRFMT_LIBS
${
PNG_LIBRARIES
}
)
endif
()
endif
()
if
(
WITH_TIFF
)
if
(
WITH_TIFF
)
add_definitions
(
-DHAVE_TIFF
)
add_definitions
(
-DHAVE_TIFF
)
ocv_include_directories
(
${
TIFF_INCLUDE_DIR
}
)
ocv_include_directories
(
${
TIFF_INCLUDE_DIR
}
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
${
TIFF_LIBRARIES
}
)
list
(
APPEND GRFMT_LIBS
${
TIFF_LIBRARIES
}
)
endif
()
endif
()
if
(
WITH_JASPER
)
if
(
WITH_JASPER
)
add_definitions
(
-DHAVE_JASPER
)
add_definitions
(
-DHAVE_JASPER
)
ocv_include_directories
(
${
JASPER_INCLUDE_DIR
}
)
ocv_include_directories
(
${
JASPER_INCLUDE_DIR
}
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
${
JASPER_LIBRARIES
}
)
list
(
APPEND GRFMT_LIBS
${
JASPER_LIBRARIES
}
)
endif
()
endif
()
if
(
WITH_OPENEXR AND OPENEXR_FOUND
)
if
(
WITH_OPENEXR AND OPENEXR_FOUND
)
add_definitions
(
-DHAVE_OPENEXR
)
add_definitions
(
-DHAVE_OPENEXR
)
ocv_include_directories
(
${
OPENEXR_INCLUDE_PATHS
}
)
ocv_include_directories
(
${
OPENEXR_INCLUDE_PATHS
}
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
${
OPENEXR_LIBRARIES
}
)
list
(
APPEND GRFMT_LIBS
${
OPENEXR_LIBRARIES
}
)
endif
()
endif
()
file
(
GLOB grfmt_hdrs src/grfmt*.hpp
)
file
(
GLOB grfmt_hdrs src/grfmt*.hpp
)
file
(
GLOB grfmt_srcs src/grfmt*.cpp
)
file
(
GLOB grfmt_srcs src/grfmt*.cpp
)
set
(
grfmt_hdrs src/bitstrm.hpp
${
grfmt_hdrs
}
)
list
(
APPEND grfmt_hdrs src/bitstrm.hpp
)
set
(
grfmt_srcs src/bitstrm.cpp
${
grfmt_srcs
}
)
list
(
APPEND grfmt_srcs src/bitstrm.cpp
)
source_group
(
"Src
\\
grfmts"
FILES
${
grfmt_hdrs
}
${
grfmt_srcs
}
)
source_group
(
"Src
\\
grfmts"
FILES
${
grfmt_hdrs
}
${
grfmt_srcs
}
)
set
(
highgui_hdrs src/precomp.hpp src/utils.hpp src/cap_ffmpeg_impl.hpp
)
set
(
highgui_hdrs
src/precomp.hpp
src/utils.hpp
src/cap_ffmpeg_impl.hpp
)
set
(
highgui_srcs
set
(
highgui_srcs
src/cap.cpp
src/cap.cpp
...
@@ -66,180 +70,133 @@ set(highgui_srcs
...
@@ -66,180 +70,133 @@ set(highgui_srcs
file
(
GLOB highgui_ext_hdrs
"include/opencv2/
${
name
}
/*.hpp"
"include/opencv2/
${
name
}
/*.h"
)
file
(
GLOB highgui_ext_hdrs
"include/opencv2/
${
name
}
/*.hpp"
"include/opencv2/
${
name
}
/*.h"
)
#YV
if
(
HAVE_QT
)
if
(
HAVE_QT
)
if
(
HAVE_QT_OPENGL
)
if
(
HAVE_QT_OPENGL
)
set
(
QT_USE_QTOPENGL TRUE
)
set
(
QT_USE_QTOPENGL TRUE
)
endif
()
endif
()
INCLUDE
(
${
QT_USE_FILE
}
)
include
(
${
QT_USE_FILE
}
)
SET
(
_RCCS_FILES src/window_QT.qrc
)
QT4_ADD_RESOURCES
(
_RCC_OUTFILES src/window_QT.qrc
)
QT4_ADD_RESOURCES
(
_RCC_OUTFILES
${
_RCCS_FILES
}
)
QT4_WRAP_CPP
(
_MOC_OUTFILES src/window_QT.h
)
SET
(
_MOC_HEADERS src/window_QT.h
)
list
(
APPEND HIGHGUI_LIBRARIES
${
QT_LIBRARIES
}
${
QT_QTTEST_LIBRARY
}
)
QT4_WRAP_CPP
(
_MOC_OUTFILES
${
_MOC_HEADERS
}
)
list
(
APPEND highgui_srcs src/window_QT.cpp
${
_MOC_OUTFILES
}
${
_RCC_OUTFILES
}
)
elseif
(
WIN32
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
${
QT_LIBRARIES
}
${
QT_QTTEST_LIBRARY
}
)
list
(
APPEND highgui_srcs src/window_w32.cpp
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_QT.cpp
${
_MOC_OUTFILES
}
${
_RCC_OUTFILES
}
)
elseif
(
HAVE_GTK
)
list
(
APPEND highgui_srcs src/window_gtk.cpp
)
elseif
(
APPLE
)
if
(
WITH_CARBON
)
add_definitions
(
-DHAVE_CARBON=1
)
list
(
APPEND highgui_srcs src/window_carbon.cpp
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework Carbon"
"-framework QuickTime"
)
elseif
(
NOT IOS
)
add_definitions
(
-DHAVE_COCOA=1
)
list
(
APPEND highgui_srcs src/window_cocoa.mm
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework Cocoa"
)
endif
()
endif
()
endif
()
if
(
WIN32
)
if
(
WIN32
)
if
(
NOT HAVE_QT
)
list
(
APPEND highgui_srcs src/cap_vfw.cpp src/cap_cmu.cpp src/cap_dshow.cpp
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_w32.cpp
)
endif
(
WIN32
)
endif
()
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_vfw.cpp src/cap_cmu.cpp src/cap_dshow.cpp
)
if
(
HAVE_MIL
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_mil.cpp
)
endif
()
endif
()
if
(
UNIX
)
if
(
NOT HAVE_QT
)
if
(
HAVE_GTK
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_gtk.cpp
)
endif
()
endif
()
if
(
HAVE_XINE
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_xine.cpp
)
endif
()
if
(
HAVE_DC1394_2
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_dc1394_v2.cpp
)
endif
()
if
(
HAVE_DC1394
)
if
(
HAVE_XINE
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_dc1394.cpp
)
list
(
APPEND highgui_srcs src/cap_xine.cpp
)
endif
()
endif
(
HAVE_XINE
)
if
(
HAVE_FFMPEG
)
if
(
BZIP2_LIBRARIES
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
${
BZIP2_LIBRARIES
}
)
endif
()
endif
()
if
(
HAVE_PVAPI
)
add_definitions
(
-DHAVE_PVAPI
)
ocv_include_directories
(
${
PVAPI_INCLUDE_PATH
}
)
if
(
X86
)
set
(
PVAPI_SDK_SUBDIR x86
)
elseif
(
X86_64
)
set
(
PVAPI_SDK_SUBDIR x64
)
elseif
(
CMAKE_SYSTEM_PROCESSOR MATCHES arm
)
set
(
PVAPI_SDK_SUBDIR arm
)
endif
()
if
(
PVAPI_SDK_SUBDIR AND CMAKE_COMPILER_IS_GNUCXX
)
get_filename_component
(
PVAPI_EXPECTED_LIB_PATH
"
${
PVAPI_INCLUDE_PATH
}
/../lib-pc/
${
PVAPI_SDK_SUBDIR
}
/
${
CMAKE_OPENCV_GCC_VERSION_MAJOR
}
.
${
CMAKE_OPENCV_GCC_VERSION_MINOR
}
"
ABSOLUTE
)
link_directories
(
${
PVAPI_EXPECTED_LIB_PATH
}
)
endif
()
set
(
highgui_srcs src/cap_pvapi.cpp
${
highgui_srcs
}
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
PvAPI
)
endif
()
if
(
HAVE_GSTREAMER
)
if
(
HAVE_DC1394_2
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_gstreamer
.cpp
)
list
(
APPEND highgui_srcs src/cap_dc1394_v2
.cpp
)
endif
(
)
endif
(
HAVE_DC1394_2
)
if
(
HAVE_UNICAP
)
if
(
HAVE_DC1394
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_unicap
.cpp
)
list
(
APPEND highgui_srcs src/cap_dc1394
.cpp
)
endif
(
)
endif
(
HAVE_DC1394
)
if
(
HAVE_LIBV4L
)
if
(
HAVE_GSTREAMER
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_libv4l.cpp
)
list
(
APPEND highgui_srcs src/cap_gstreamer.cpp
)
else
()
endif
(
HAVE_GSTREAMER
)
if
(
HAVE_CAMV4L OR HAVE_CAMV4L2
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_v4l.cpp
)
endif
()
endif
()
foreach
(
P
${
HIGHGUI_INCLUDE_DIRS
}
)
if
(
HAVE_UNICAP
)
ocv_include_directories
(
${
P
}
)
list
(
APPEND highgui_srcs src/cap_unicap.cpp
)
endforeach
(
)
endif
(
HAVE_UNICAP
)
foreach
(
P
${
HIGHGUI_LIBRARY_DIRS
}
)
if
(
HAVE_LIBV4L
)
link_directories
(
${
P
}
)
list
(
APPEND highgui_srcs src/cap_libv4l.cpp
)
endforeach
()
elseif
(
HAVE_CAMV4L OR HAVE_CAMV4L2
)
list
(
APPEND highgui_srcs src/cap_v4l.cpp
)
endif
()
endif
()
#OpenNI
if
(
HAVE_OPENNI
)
if
(
WITH_OPENNI AND HAVE_OPENNI
)
list
(
APPEND highgui_srcs src/cap_openni.cpp
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_openni.cpp
)
ocv_include_directories
(
${
OPENNI_INCLUDE_DIR
}
)
ocv_include_directories
(
${
OPENNI_INCLUDE_DIR
}
)
endif
()
list
(
APPEND HIGHGUI_LIBRARIES
${
OPENNI_LIBRARY
}
)
endif
(
HAVE_OPENNI
)
#YV
if
(
APPLE
)
if
(
NOT IOS
)
add_definitions
(
-DHAVE_QUICKTIME=1
)
endif
()
if
(
NOT OPENCV_BUILD_3RDPARTY_LIBS
)
add_definitions
(
-DHAVE_IMAGEIO=1
)
endif
()
if
(
NOT HAVE_QT
)
if
(
WITH_CARBON
)
add_definitions
(
-DHAVE_CARBON=1
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_carbon.cpp
)
else
()
add_definitions
(
-DHAVE_COCOA=1
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_cocoa.mm
)
endif
()
endif
()
if
(
WITH_QUICKTIME
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_qt.cpp
)
else
()
if
(
WITH_AVFOUNDATION
)
add_definitions
(
-DHAVE_AVFOUNDATION=1
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_avfoundation.mm
)
else
()
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_qtkit.mm
)
endif
()
endif
()
if
(
HAVE_FFMPEG
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
"-framework VideoDecodeAcceleration"
)
endif
()
endif
(
APPLE
)
if
(
HAVE_opencv_androidcamera
)
if
(
HAVE_opencv_androidcamera
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_android.cpp
)
list
(
APPEND highgui_srcs
src/cap_android.cpp
)
add_definitions
(
-DHAVE_ANDROID_NATIVE_CAMERA
)
#TODO: remove this line
add_definitions
(
-DHAVE_ANDROID_NATIVE_CAMERA
)
#TODO: remove this line
endif
()
endif
(
HAVE_opencv_androidcamera
)
if
(
HAVE_XIMEA
AND XIMEA_FOUND
)
if
(
HAVE_XIMEA
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_ximea.cpp
)
list
(
APPEND highgui_srcs
src/cap_ximea.cpp
)
ocv_include_directories
(
${
XIMEA_PATH
}
)
ocv_include_directories
(
${
XIMEA_PATH
}
)
link_directories
(
${
XIMEA_LIBRARY_DIR
}
)
link_directories
(
${
XIMEA_LIBRARY_DIR
}
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
m3api
)
list
(
APPEND HIGHGUI_LIBRARIES m3api
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_ximea.cpp
)
endif
(
HAVE_XIMEA
)
endif
()
if
(
HAVE_FFMPEG
)
if
(
OPENNI_LIBRARY
)
if
(
UNIX AND BZIP2_LIBRARIES
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
${
OPENNI_LIBRARY
}
)
list
(
APPEND HIGHGUI_LIBRARIES
${
BZIP2_LIBRARIES
}
)
endif
()
elseif
(
APPLE
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework VideoDecodeAcceleration"
)
if
(
APPLE AND NOT IOS
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
bz2
"-framework Cocoa"
"-framework QuartzCore"
)
if
(
WITH_CARBON
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
"-framework Carbon"
)
endif
()
endif
()
if
(
NOT WITH_QUICKTIME
)
endif
(
HAVE_FFMPEG
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
"-framework QTKit"
)
if
(
HAVE_PVAPI
)
add_definitions
(
-DHAVE_PVAPI
)
ocv_include_directories
(
${
PVAPI_INCLUDE_PATH
}
)
if
(
X86
)
set
(
PVAPI_SDK_SUBDIR x86
)
elseif
(
X86_64
)
set
(
PVAPI_SDK_SUBDIR x64
)
elseif
(
CMAKE_SYSTEM_PROCESSOR MATCHES arm
)
set
(
PVAPI_SDK_SUBDIR arm
)
endif
()
endif
()
if
(
WITH_CARBON OR WITH_QUICKTIME
)
if
(
PVAPI_SDK_SUBDIR AND CMAKE_COMPILER_IS_GNUCXX
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
"-framework QuickTime"
"-framework CoreFoundation"
)
get_filename_component
(
PVAPI_EXPECTED_LIB_PATH
"
${
PVAPI_INCLUDE_PATH
}
/../lib-pc/
${
PVAPI_SDK_SUBDIR
}
/
${
CMAKE_OPENCV_GCC_VERSION_MAJOR
}
.
${
CMAKE_OPENCV_GCC_VERSION_MINOR
}
"
ABSOLUTE
)
link_directories
(
${
PVAPI_EXPECTED_LIB_PATH
}
)
endif
()
endif
()
set
(
highgui_srcs src/cap_pvapi.cpp
${
highgui_srcs
}
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
PvAPI
)
endif
()
endif
()
if
(
IOS
)
if
(
WITH_IMAGEIO
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
bz2
"-framework QuartzCore"
"-framework CoreFoundation"
"-framework ImageIO"
"-framework CoreGraphics"
"-framework AVFoundation"
)
add_definitions
(
-DHAVE_IMAGEIO=1
)
if
(
IOS
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework ImageIO"
)
endif
()
#TODO: check if need to link with some framework on OS X: -framework ApplicationServices ??
endif
(
WITH_IMAGEIO
)
if
(
WITH_AVFOUNDATION
)
add_definitions
(
-DHAVE_AVFOUNDATION=1
)
list
(
APPEND highgui_srcs src/cap_avfoundation.mm
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework AVFoundation"
)
elseif
(
APPLE
)
add_definitions
(
-DHAVE_QUICKTIME=1
)
if
(
WITH_QUICKTIME
)
list
(
APPEND highgui_srcs src/cap_qt.cpp
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework Carbon"
"-framework QuickTime"
"-framework CoreFoundation"
)
else
()
list
(
APPEND highgui_srcs src/cap_qtkit.mm
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework QTKit"
)
endif
()
endif
()
endif
()
if
(
WIN32
)
if
(
WIN32
)
link_directories
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/lib"
)
link_directories
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/lib"
)
# for ffmpeg wrapper only
include_directories
(
AFTER
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/include"
)
#
for directshow
include_directories
(
AFTER
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/include"
)
#
for directshow in VS2005 and multi-monitor support on MinGW
endif
()
endif
()
source_group
(
"Src"
FILES
${
highgui_srcs
}
${
highgui_hdrs
}
)
source_group
(
"Src"
FILES
${
highgui_srcs
}
${
highgui_hdrs
}
)
...
@@ -247,6 +204,7 @@ source_group("Include" FILES ${highgui_ext_hdrs})
...
@@ -247,6 +204,7 @@ source_group("Include" FILES ${highgui_ext_hdrs})
ocv_set_module_sources
(
HEADERS
${
highgui_ext_hdrs
}
SOURCES
${
highgui_srcs
}
${
highgui_hdrs
}
${
grfmt_srcs
}
${
grfmt_hdrs
}
)
ocv_set_module_sources
(
HEADERS
${
highgui_ext_hdrs
}
SOURCES
${
highgui_srcs
}
${
highgui_hdrs
}
${
grfmt_srcs
}
${
grfmt_hdrs
}
)
ocv_module_include_directories
()
ocv_module_include_directories
()
ocv_list_unique
(
HIGHGUI_LIBRARIES
)
ocv_create_module
(
${
GRFMT_LIBS
}
${
HIGHGUI_LIBRARIES
}
)
ocv_create_module
(
${
GRFMT_LIBS
}
${
HIGHGUI_LIBRARIES
}
)
if
(
BUILD_SHARED_LIBS
)
if
(
BUILD_SHARED_LIBS
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment