Skip to content

Commit

Permalink
Update for Qt 6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Apr 13, 2022
1 parent b30865c commit ed1411f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
3 changes: 2 additions & 1 deletion external/qt/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

if (NOT DESKTOP_APP_USE_PACKAGED)
if (DESKTOP_APP_QT6)
set(qt_version 6.2.4)
set(qt_version 6.3.0)
else()
set(qt_version 5.15.3)
endif()
Expand All @@ -32,6 +32,7 @@ if (LINUX)
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
if (DESKTOP_APP_QT6)
find_package(Qt6 COMPONENTS WaylandClient REQUIRED)
find_package(Qt6 OPTIONAL_COMPONENTS WaylandGlobalPrivate QUIET)
else()
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
Expand Down
36 changes: 23 additions & 13 deletions external/qt/qt6/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,37 @@ if (DESKTOP_APP_USE_PACKAGED)
target_link_libraries(external_qt
INTERFACE
Qt6::Core
Qt6::CorePrivate
Qt6::Core5Compat
Qt6::Gui
Qt6::GuiPrivate
Qt6::OpenGL
Qt6::Widgets
Qt6::OpenGLWidgets
Qt6::Network
Qt6::Svg
)

target_include_directories(external_qt SYSTEM
INTERFACE
${Qt6Core_PRIVATE_INCLUDE_DIRS}
${Qt6Gui_PRIVATE_INCLUDE_DIRS}
)

if (Qt6DBus_FOUND)
target_link_libraries(external_qt INTERFACE Qt6::DBus)
target_link_libraries(external_qt
INTERFACE
Qt6::DBus
)
endif()

if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_link_libraries(external_qt INTERFACE Qt6::WaylandClient)

target_include_directories(external_qt SYSTEM
target_link_libraries(external_qt
INTERFACE
${Qt6WaylandClient_PRIVATE_INCLUDE_DIRS}
Qt6::WaylandClient
Qt6::WaylandClientPrivate
)

if (Qt6WaylandGlobalPrivate_FOUND)
target_link_libraries(external_qt
INTERFACE
Qt6::WaylandGlobalPrivate
)
endif()
endif()

return()
Expand Down Expand Up @@ -69,8 +74,11 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtWaylandClient
${qt_loc}/include/QtWaylandGlobal
${qt_loc}/include/QtWaylandClient/${qt_version}
${qt_loc}/include/QtWaylandGlobal/${qt_version}
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
${qt_loc}/include/QtWaylandGlobal/${qt_version}/QtWaylandGlobal
)
endif()

Expand Down Expand Up @@ -100,6 +108,7 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
target_compile_definitions(external_qt
INTERFACE
QT_WAYLANDCLIENT_LIB
QT_WAYLANDGLOBAL_LIB
)
endif()

Expand Down Expand Up @@ -252,7 +261,6 @@ if (LINUX)
target_link_static_libraries(external_qt
INTERFACE
proxy
epoxy
xkbcommon
xkbcommon-x11
xcb-glx
Expand All @@ -263,7 +271,6 @@ if (LINUX)
xcb-render
xcb-image
xcb-xfixes
xcb-xinput
xcb-shape
xcb-sync
xcb-util
Expand All @@ -281,8 +288,11 @@ if (LINUX)
desktop-app::linux_xcb_helper
fontconfig
freetype
EGL
GL
xcb
X11
X11-xcb
glib-2.0
)
endif()

0 comments on commit ed1411f

Please sign in to comment.