disabled Qt by default (until the code is stabilized)
This commit is contained in:
parent
e11a77cb70
commit
fa91788222
@ -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)
|
||||
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}")
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user