mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
- Fix build with QT4 option (error: GL/glx.h: No such file or directory) [1]
- Specify major Qt version number to squash some CMake warnings about Qt5 - Use OPTIONS_RADIO for GUI support - build only allows use of one toolkit - Make OpenGL support optional (off by default since it only works with GUI support) - Allow OpenGL support with GTK2 Reported by: Wolfgang Riegler <wolfgang.riegler@gmx.de> [1]
This commit is contained in:
parent
3138ce89c5
commit
049486f9e8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=336129
@ -42,20 +42,21 @@ OCV_NONFREE_MODS= nonfree
|
||||
OCV_JAVA_MODS= java
|
||||
OCV_PYTHON_MODS= python
|
||||
|
||||
OPTIONS_DEFINE= EXAMPLES DC1394 NONFREE
|
||||
OPTIONS_GROUP= GUI IMAGE PERFORMANCE VIDEO
|
||||
OPTIONS_GROUP_GUI= GTK2 QT4
|
||||
OPTIONS_DEFINE= DC1394 EXAMPLES NONFREE OPENGL
|
||||
OPTIONS_GROUP= IMAGE PERFORMANCE VIDEO
|
||||
OPTIONS_GROUP_IMAGE= JASPER JPEG OPENEXR PNG TIFF
|
||||
OPTIONS_GROUP_PERFORMANCE= EIGEN3 TBB
|
||||
OPTIONS_GROUP_VIDEO= FFMPEG GSTREAMER V4L XINE
|
||||
OPTIONS_RADIO= GUI
|
||||
OPTIONS_RADIO_GUI= GTK2 QT4
|
||||
OPTIONS_DEFAULT= EIGEN3 JASPER JPEG PNG TIFF V4L
|
||||
OPTIONS_SUB= yes
|
||||
.if defined(OCV_CORE)
|
||||
OPTIONS_EXCLUDE= DC1394 EXAMPLES GTK2 QT4 JASPER JPEG NONFREE OPENEXR \
|
||||
PNG TIFF FFMPEG GSTREAMER V4L XINE
|
||||
OPENGL PNG TIFF FFMPEG GSTREAMER V4L XINE
|
||||
.elif defined(OCV_PYTHON)
|
||||
OPTIONS_EXCLUDE= DC1394 GTK2 QT4 JASPER JPEG NONFREE OPENEXR \
|
||||
PNG TIFF TBB EIGEN3 FFMPEG GSTREAMER V4L XINE
|
||||
OPENGL PNG TIFF TBB EIGEN3 FFMPEG GSTREAMER V4L XINE
|
||||
.endif
|
||||
|
||||
DC1394_DESC= IEEE 1394 camera support
|
||||
@ -106,6 +107,9 @@ CMAKE_ARGS+= -DWITH_GSTREAMER:BOOL=Off
|
||||
.if ${PORT_OPTIONS:MGTK2}
|
||||
USE_GNOME+= gtk20
|
||||
CMAKE_ARGS+= -DWITH_GTK:BOOL=On
|
||||
. if ${PORT_OPTIONS:MOPENGL}
|
||||
LIB_DEPENDS+= libgtkglext-x11-1.0.so:${PORTSDIR}/x11-toolkits/gtkglext
|
||||
. endif
|
||||
.else
|
||||
CMAKE_ARGS+= -DWITH_GTK:BOOL=Off
|
||||
.endif
|
||||
@ -137,6 +141,12 @@ CMAKE_ARGS+= -DWITH_OPENEXR:BOOL=On
|
||||
CMAKE_ARGS+= -DWITH_OPENEXR:BOOL=Off
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MOPENGL}
|
||||
CMAKE_ARGS+= -DWITH_OPENGL:BOOL=On
|
||||
.else
|
||||
CMAKE_ARGS+= -DWITH_OPENGL:BOOL=Off
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MPNG}
|
||||
LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png
|
||||
CMAKE_ARGS+= -DWITH_PNG:BOOL=On
|
||||
@ -145,9 +155,11 @@ CMAKE_ARGS+= -DWITH_PNG:BOOL=Off
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MQT4}
|
||||
USE_QT4+= opengl moc_build qmake_build rcc_build uic_build qtestlib
|
||||
CMAKE_ARGS+= -DWITH_QT:BOOL=On \
|
||||
-DWITH_OPENGL:BOOL=On
|
||||
USE_QT4+= gui moc_build qmake_build rcc_build uic_build qtestlib
|
||||
CMAKE_ARGS+= -DWITH_QT:STRING="4"
|
||||
. if ${PORT_OPTIONS:MQT4}
|
||||
USE_QT4+= opengl
|
||||
. endif
|
||||
.else
|
||||
CMAKE_ARGS+= -DWITH_QT:BOOL=Off
|
||||
.endif
|
||||
|
14
graphics/opencv/files/patch-cmake__OpenCVFindLibsGUI.cmake
Normal file
14
graphics/opencv/files/patch-cmake__OpenCVFindLibsGUI.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
--- ./cmake/OpenCVFindLibsGUI.cmake.orig 2013-12-10 09:20:59.000000000 -0500
|
||||
+++ ./cmake/OpenCVFindLibsGUI.cmake 2013-12-10 09:22:40.000000000 -0500
|
||||
@@ -56,10 +56,9 @@
|
||||
if(OPENGL_FOUND)
|
||||
set(HAVE_OPENGL TRUE)
|
||||
list(APPEND OPENCV_LINKER_LIBS ${OPENGL_LIBRARIES})
|
||||
+ ocv_include_directories(${OPENGL_INCLUDE_DIR})
|
||||
if(QT_QTOPENGL_FOUND)
|
||||
set(HAVE_QT_OPENGL TRUE)
|
||||
- else()
|
||||
- ocv_include_directories(${OPENGL_INCLUDE_DIR})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user