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
fa917882
Commit
fa917882
authored
14 years ago
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disabled Qt by default (until the code is stabilized)
parent
e11a77cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
112 deletions
+64
-112
CMakeLists.txt
CMakeLists.txt
+34
-60
cvconfig.h.cmake
cvconfig.h.cmake
+6
-0
CMakeLists.txt
modules/highgui/CMakeLists.txt
+16
-44
window.cpp
modules/highgui/src/window.cpp
+8
-8
No files found.
CMakeLists.txt
View file @
fa917882
...
...
@@ -500,45 +500,24 @@ endif()
#YV
############################### QT ################################
set
(
WITH_QT OFF CACHE BOOL
"Build with QT Backend support"
)
set
(
WITH_QT_OPENGL ON CACHE BOOL
"Add OpenGL extension to QT"
)
set
(
HAVE_QT 0
)
set
(
HAVE_QT_OPENGL 0
)
set
(
AUTOSWITCH_QT 1
)
#uses to disable QT
#set the booleans
find_package
(
Qt4
)
# QUIET)
if
(
QT4_FOUND AND AUTOSWITCH_QT
)
set
(
WITH_QT ON CACHE BOOL
"Build with QT Backend support"
)
find_package
(
OpenGL QUIET
)
if
(
QT_QTOPENGL_FOUND AND OPENGL_FOUND
)
set
(
WITH_QT_OPENGL ON CACHE BOOL
"Add OpenGL extension to QT"
)
endif
()
endif
()
#test if QT Bool is true
if
(
WITH_QT
)
set
(
HAVE_QT 1
)
add_definitions
(
-DHAVE_QT=1
)
if
(
UNIX
)
if
(
APPLE
)
set
(
WITH_CARBON OFF CACHE BOOL
"Use Carbon for UI instead of Cocoa"
FORCE
)
message
(
STATUS
"QT detected, so Carbon and Cocoa disabled"
)
else
()
set
(
WITH_GTK OFF CACHE BOOL
"Include GTK support"
FORCE
)
set
(
HAVE_GTK 0
)
set
(
HAVE_GTHREAD 0
)
message
(
STATUS
"QT detected, so GTK and GThread disabled"
)
endif
()
endif
()
if
(
WITH_QT_OPENGL
)
message
(
STATUS
"OpenGL for QT enabled"
)
set
(
HAVE_QT_OPENGL 1
)
add_definitions
(
-DOPENCV_GL=1
)
if
(
WITH_QT
)
find_package
(
Qt4
)
if
(
QT4_FOUND
)
set
(
HAVE_QT 1
)
find_package
(
OpenGL QUIET
)
if
(
QT_QTOPENGL_FOUND AND OPENGL_FOUND
)
set
(
HAVE_QT_OPENGL 1
)
endif
()
endif
()
endif
()
############################### TBB ################################
if
(
WITH_TBB
)
...
...
@@ -1166,35 +1145,30 @@ message(STATUS " Linker flags (Debug): ${CMAKE_SHARED_LINKER_FLAGS} ${CM
endif
()
#YV
if
(
UNIX AND NOT APPLE
)
message
(
STATUS
""
)
message
(
STATUS
" GUI: "
)
if
(
HAVE_QT
)
message
(
STATUS
" QT 4.x:
${
HAVE_QT
}
"
)
message
(
STATUS
" QT OpenGL support:
${
HAVE_QT_OPENGL
}
"
)
else
()
message
(
STATUS
" GTK+ 2.x:
${
HAVE_GTK
}
"
)
message
(
STATUS
" GThread:
${
HAVE_GTHREAD
}
"
)
endif
()
message
(
STATUS
""
)
endif
()
message
(
STATUS
""
)
message
(
STATUS
" GUI: "
)
if
(
APPLE
)
message
(
STATUS
""
)
if
(
HAVE_QT
)
message
(
STATUS
" GUI: "
)
message
(
STATUS
" QT 4.x:
${
HAVE_QT
}
"
)
message
(
STATUS
" QT OpenGL support:
${
HAVE_QT_OPENGL
}
"
)
else
()
if
(
WITH_CARBON
)
message
(
STATUS
" GUI Back-end: Carbon"
)
else
()
message
(
STATUS
" GUI Back-end: Cocoa"
)
endif
()
message
(
STATUS
""
)
endif
()
if
(
HAVE_QT
)
message
(
STATUS
" QT 4.x:
${
HAVE_QT
}
"
)
message
(
STATUS
" QT OpenGL support:
${
HAVE_QT_OPENGL
}
"
)
else
()
if
(
WIN32
)
message
(
STATUS
" Win32 UI: 1"
)
else
()
if
(
APPLE
)
if
(
WITH_CARBON
)
message
(
STATUS
" Carbon: 1"
)
else
()
message
(
STATUS
" Cocoa: 1"
)
endif
()
else
()
message
(
STATUS
" GTK+ 2.x:
${
HAVE_GTK
}
"
)
message
(
STATUS
" GThread:
${
HAVE_GTHREAD
}
"
)
endif
()
endif
()
endif
()
message
(
STATUS
""
)
message
(
STATUS
" Image I/O: "
)
if
(
NOT WITH_JPEG OR JPEG_FOUND
)
message
(
STATUS
" JPEG:
${
JPEG_FOUND
}
"
)
...
...
This diff is collapsed.
Click to expand it.
cvconfig.h.cmake
View file @
fa917882
...
...
@@ -159,3 +159,9 @@
/* Eigen2 Matrix & Linear Algebra Library */
#cmakedefine HAVE_EIGEN2
/* Qt bindings */
#cmakedefine HAVE_QT
/* Qt bindings use OpenGL */
#cmakedefine HAVE_HAVE_QT_OPENGL
This diff is collapsed.
Click to expand it.
modules/highgui/CMakeLists.txt
View file @
fa917882
...
...
@@ -72,24 +72,23 @@ foreach(h ${lib_hdr_names})
endforeach
()
#YV
if
(
HAVE_QT
)
if
(
HAVE_QT_OPENGL
)
set
(
QT_USE_QTOPENGL TRUE
)
endif
()
INCLUDE
(
${
QT_USE_FILE
}
)
SET
(
_MOC_HEADERS src/window_QT.h
)
QT4_WRAP_CPP
(
_MOC_OUTFILES
${
_MOC_HEADERS
}
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
${
QT_LIBRARIES
}
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_QT.cpp
${
_MOC_OUTFILES
}
)
endif
()
if
(
WIN32
)
if
(
HAVE_QT
)
if
(
HAVE_QT_OPENGL
)
set
(
QT_USE_QTOPENGL TRUE
)
endif
()
INCLUDE
(
${
QT_USE_FILE
}
)
SET
(
_MOC_HEADERS src/window_QT.h
)
QT4_WRAP_CPP
(
_MOC_OUTFILES
${
_MOC_HEADERS
}
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
${
QT_LIBRARIES
}
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_QT.cpp
${
_MOC_OUTFILES
}
)
else
()
if
(
NOT HAVE_QT
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_w32.cpp
)
endif
()
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_vfw.cpp src/cap_cmu.cpp src/cap_w32.cpp src/cap_dshow.cpp
)
if
(
HAVE_MIL
)
set
(
highgui_srcs
${
highgui_srcs
}
src/cap_mil.cpp
)
...
...
@@ -97,25 +96,10 @@ if(WIN32)
endif
()
if
(
UNIX
)
if
(
HAVE_QT
)
if
(
HAVE_QT_OPENGL
)
set
(
QT_USE_QTOPENGL TRUE
)
#set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} ${OPENGL_LIBRARIES})
endif
()
INCLUDE
(
${
QT_USE_FILE
}
)
SET
(
_MOC_HEADERS src/window_QT.h
)
QT4_WRAP_CPP
(
_MOC_OUTFILES
${
_MOC_HEADERS
}
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
${
QT_LIBRARIES
}
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_QT.cpp
${
_MOC_OUTFILES
}
)
else
()
if
(
NOT HAVE_QT
)
if
(
HAVE_GTK
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_gtk.cpp
)
endif
()
endif
()
if
(
HAVE_XINE
)
...
...
@@ -193,19 +177,7 @@ if(APPLE)
add_definitions
(
-DHAVE_IMAGEIO=1
)
endif
()
if
(
HAVE_QT
)
if
(
HAVE_QT_OPENGL
)
set
(
QT_USE_QTOPENGL TRUE
)
endif
()
INCLUDE
(
${
QT_USE_FILE
}
)
SET
(
_MOC_HEADERS src/window_QT.h
)
QT4_WRAP_CPP
(
_MOC_OUTFILES
${
_MOC_HEADERS
}
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
${
QT_LIBRARIES
}
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_QT.cpp
${
_MOC_OUTFILES
}
)
else
()
if
(
NOT HAVE_QT
)
if
(
WITH_CARBON
)
add_definitions
(
-DHAVE_CARBON=1
)
set
(
highgui_srcs
${
highgui_srcs
}
src/window_carbon.cpp
)
...
...
This diff is collapsed.
Click to expand it.
modules/highgui/src/window.cpp
View file @
fa917882
...
...
@@ -53,14 +53,14 @@ CV_IMPL void cvSetWindowProperty(const char* name, int prop_id, double prop_valu
if
(
!
name
||
(
prop_value
!=
CV_WINDOW_NORMAL
&&
prop_value
!=
CV_WINDOW_FULLSCREEN
))
//bad argument
break
;
#if defined WIN32 || defined _WIN32
#if defined (HAVE_QT)
cvSetModeWindow_QT
(
name
,
prop_value
);
#elif defined WIN32 || defined _WIN32
cvSetModeWindow_W32
(
name
,
prop_value
);
#elif defined (HAVE_GTK)
cvSetModeWindow_GTK
(
name
,
prop_value
);
#elif defined (HAVE_CARBON)
cvSetModeWindow_CARBON
(
name
,
prop_value
);
#elif defined (HAVE_QT)
cvSetModeWindow_QT
(
name
,
prop_value
);
#endif
break
;
...
...
@@ -89,16 +89,16 @@ CV_IMPL double cvGetWindowProperty(const char* name, int prop_id)
if
(
!
name
)
//bad argument
return
-
1
;
#if defined WIN32 || defined _WIN32
#if defined (HAVE_QT)
return
cvGetModeWindow_QT
(
name
);
#elif defined WIN32 || defined _WIN32
return
cvGetModeWindow_W32
(
name
);
#elif defined (HAVE_GTK)
return
cvGetModeWindow_GTK
(
name
);
#elif defined (HAVE_CARBON)
return
cvGetModeWindow_CARBON
(
name
);
#elif defined (HAVE_QT)
return
cvGetModeWindow_QT
(
name
);
#else
#else
return
-
1
;
#endif
...
...
This diff is collapsed.
Click to expand it.
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