diff --git a/build/cmake/files.cmake b/build/cmake/files.cmake index acc11ed452..d64208a00d 100644 --- a/build/cmake/files.cmake +++ b/build/cmake/files.cmake @@ -379,6 +379,14 @@ set(MEDIA_QT_SRC src/qt/mediactrl.cpp ) +set(OPENGL_QT_HDR + wx/qt/glcanvas.h +) + +set(OPENGL_QT_SRC + src/qt/glcanvas.cpp +) + set(BASE_CMN_SRC src/common/any.cpp src/common/appbase.cpp diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index 4c93866c8f..f967050c5a 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -151,11 +151,21 @@ if(wxUSE_THREADS) endif() if(wxUSE_GUI) - if(WIN32 AND wxUSE_METAFILE) + if(WXMSW AND wxUSE_METAFILE) # this one should probably be made separately configurable set(wxUSE_ENH_METAFILE ON) endif() + # WXQT checks + if(WXQT) + wx_option_force_value(wxUSE_WEBVIEW OFF) + wx_option_force_value(wxUSE_METAFILE OFF) + if(WIN32) + wx_option_force_value(wxUSE_ACCESSIBILITY OFF) + endif() + endif() + + # extra dependencies if(wxUSE_OPENGL) find_package(OpenGL) if(NOT OPENGL_FOUND) diff --git a/build/cmake/lib/core/CMakeLists.txt b/build/cmake/lib/core/CMakeLists.txt index 3bd8719d91..20e4636cbf 100644 --- a/build/cmake/lib/core/CMakeLists.txt +++ b/build/cmake/lib/core/CMakeLists.txt @@ -41,6 +41,11 @@ elseif(WXOSX_COCOA) wx_append_sources(CORE_SRC OSX_LOWLEVEL) wx_append_sources(CORE_SRC OSX_SHARED) wx_append_sources(CORE_SRC OSX_COCOA) +elseif(WXQT) + wx_append_sources(CORE_SRC QT) + if(WIN32) + wx_append_sources(CORE_SRC QT_WIN32) + endif() endif() wx_add_library(core ${CORE_SRC}) diff --git a/build/cmake/lib/gl/CMakeLists.txt b/build/cmake/lib/gl/CMakeLists.txt index 18ac4ac855..605a2b4f66 100644 --- a/build/cmake/lib/gl/CMakeLists.txt +++ b/build/cmake/lib/gl/CMakeLists.txt @@ -11,12 +11,14 @@ include(../../source_groups.cmake) wx_append_sources(GL_FILES OPENGL_CMN) -if(WIN32) +if(WXMSW) wx_append_sources(GL_FILES OPENGL_MSW) elseif(WXGTK) wx_append_sources(GL_FILES OPENGL_GTK) elseif(APPLE) wx_append_sources(GL_FILES OPENGL_OSX_SHARED) +elseif(WXQT) + wx_append_sources(GL_FILES OPENGL_QT) endif() wx_add_library(gl ${GL_FILES}) diff --git a/build/cmake/lib/media/CMakeLists.txt b/build/cmake/lib/media/CMakeLists.txt index 5c536daa1a..7452774956 100644 --- a/build/cmake/lib/media/CMakeLists.txt +++ b/build/cmake/lib/media/CMakeLists.txt @@ -17,6 +17,8 @@ elseif(WXOSX_COCOA) wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA) elseif(UNIX) wx_append_sources(MEDIA_FILES MEDIA_UNIX) +elseif(WXQT) + wx_append_sources(MEDIA_FILES MEDIA_QT) endif() wx_add_library(media ${MEDIA_FILES}) diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index 48b2ddf70a..b399e7ec2f 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -353,9 +353,6 @@ wx_option(wxUSE_HOTKEY "use wxWindow::RegisterHotKey()") wx_option(wxUSE_JOYSTICK "use wxJoystick") wx_option(wxUSE_METAFILE "use wxMetaFile") wx_option(wxUSE_DRAGIMAGE "use wxDragImage") -if(WXMSW) - wx_option(wxUSE_ACCESSIBILITY "enable accessibility support") -endif() wx_option(wxUSE_UIACTIONSIMULATOR "use wxUIActionSimulator (experimental)") wx_option(wxUSE_DC_TRANSFORM_MATRIX "use wxDC::SetTransformMatrix and related") wx_option(wxUSE_WEBVIEW_WEBKIT "use wxWebView WebKit backend") @@ -403,6 +400,7 @@ if(WIN32) set(wxUSE_WINRT_DEFAULT OFF) endif() wx_option(wxUSE_WINRT "enable WinRT support" ${wxUSE_WINRT_DEFAULT}) + wx_option(wxUSE_ACCESSIBILITY "enable accessibility support") endif() # this one is not really MSW-specific but it exists mainly to be turned off diff --git a/build/cmake/samples/CMakeLists.txt b/build/cmake/samples/CMakeLists.txt index 0e19f47d72..09a299ffbd 100644 --- a/build/cmake/samples/CMakeLists.txt +++ b/build/cmake/samples/CMakeLists.txt @@ -264,13 +264,15 @@ if(WIN32) wx_add_sample(dll sdk_exe.cpp my_dll.h NAME sdk_exe FOLDER dll LIBRARIES my_dll) endif() - if(MSVC) - wx_add_sample(flash) - endif() - #TODO: reenable when sample is fixed - #wx_add_sample(mfc mfctest.cpp mfctest.h resource.h stdafx.h RES mfctest.rc) - wx_add_sample(nativdlg nativdlg.cpp nativdlg.h resource.h RES nativdlg.rc) - wx_add_sample(oleauto DEPENDS wxUSE_OLE) + wx_add_sample(regtest RES regtest.rc DEPENDS wxUSE_REGKEY) - wx_add_sample(taskbarbutton DEPENDS wxUSE_TASKBARBUTTON) + wx_add_sample(oleauto DEPENDS wxUSE_OLE) + + if(WXMSW) + wx_add_sample(nativdlg nativdlg.cpp nativdlg.h resource.h RES nativdlg.rc) + #TODO: reenable when sample is fixed + #wx_add_sample(mfc mfctest.cpp mfctest.h resource.h stdafx.h RES mfctest.rc) + wx_add_sample(taskbarbutton DEPENDS wxUSE_TASKBARBUTTON) + wx_add_sample(flash DEPENDS wxUSE_ACTIVEX) + endif() endif() diff --git a/build/cmake/toolkit.cmake b/build/cmake/toolkit.cmake index 02f9982920..2117f7cace 100644 --- a/build/cmake/toolkit.cmake +++ b/build/cmake/toolkit.cmake @@ -46,6 +46,8 @@ if(wxBUILD_TOOLKIT MATCHES "^gtk*") set(WXGTK ON) elseif(wxBUILD_TOOLKIT MATCHES "^osx*") set(WXOSX ON) +elseif(wxBUILD_TOOLKIT MATCHES "qt") + set(WXQT ON) endif() set(wxTOOLKIT_DEFINITIONS __WX${toolkit_upper}__) @@ -113,7 +115,19 @@ if(WXGTK) endif() endif() +if(WXQT) + set(QT_COMPONENTS Core Widgets Gui OpenGL Test) + foreach(QT_COMPONENT ${QT_COMPONENTS}) + find_package(Qt5 COMPONENTS ${QT_COMPONENT} REQUIRED) + list(APPEND wxTOOLKIT_INCLUDE_DIRS ${Qt5${QT_COMPONENT}_INCLUDE_DIRS}) + list(APPEND wxTOOLKIT_LIBRARIES ${Qt5${QT_COMPONENT}_LIBRARIES}) + list(APPEND wxTOOLKIT_DEFINITIONS ${Qt5${QT_COMPONENT}_COMPILE_DEFINITIONS}) + endforeach() + set(wxTOOLKIT_VERSION ${Qt5Core_VERSION}) +endif() + if(APPLE) list(APPEND wxTOOLKIT_DEFINITIONS __WXMAC__ __WXOSX__) endif() + endif() # wxUSE_GUI diff --git a/build/files b/build/files index 19bdf348ec..13b2eae984 100644 --- a/build/files +++ b/build/files @@ -398,6 +398,12 @@ QT_SRC= MEDIA_QT_SRC= src/qt/mediactrl.cpp +OPENGL_QT_HDR= + wx/qt/glcanvas.h + +OPENGL_QT_SRC= + src/qt/glcanvas.cpp + ## Common BASE_CMN_SRC =