1
0
Fork 0

Some cleanup of unneeded hacks

qt5ct is removed since internal gtk integration is good enough
Removed the ability to override path to qtwayland client headers since that hack is no longer used
QXdgDesktopPortalThemePlugin is no longer linked since custom xdg-desktop-portal dialog implementation is present
This commit is contained in:
Ilya Fedin 2021-06-19 03:51:50 +04:00 committed by John Preston
parent 97b9c3f6d8
commit e002bba002
10 changed files with 10 additions and 225 deletions

View file

@ -52,9 +52,6 @@ add_checked_subdirectory(openal)
add_checked_subdirectory(openssl)
add_checked_subdirectory(opus)
add_checked_subdirectory(qt)
if (LINUX)
add_checked_subdirectory(qt5ct_support)
endif()
add_checked_subdirectory(qr_code_generator)
add_checked_subdirectory(ranges)
add_checked_subdirectory(rlottie)

View file

@ -28,35 +28,6 @@ if (DESKTOP_APP_USE_PACKAGED)
target_link_libraries(external_qt INTERFACE Qt5::DBus)
endif()
if (LINUX AND DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
find_library(Qt5ThemeSupport_LIBRARY
NAMES
Qt5ThemeSupport
REQUIRED
)
find_path(Qt5ThemeSupport_INCLUDE_DIR
NAMES
QtThemeSupport/private/qgenericunixthemes_p.h
HINTS
${Qt5Gui_INCLUDE_DIRS}
PATH_SUFFIXES
QtThemeSupport/${Qt5Gui_VERSION}
REQUIRED
)
target_link_libraries(external_qt
INTERFACE
${Qt5ThemeSupport_LIBRARY}
)
target_include_directories(external_qt
INTERFACE
${Qt5ThemeSupport_INCLUDE_DIR}
${Qt5ThemeSupport_INCLUDE_DIR}/QtThemeSupport
)
endif()
if (Qt5XkbCommonSupport_FOUND)
target_link_libraries(external_qt INTERFACE Qt5::XkbCommonSupport)
@ -69,19 +40,11 @@ if (DESKTOP_APP_USE_PACKAGED)
if (Qt5WaylandClient_FOUND)
target_link_libraries(external_qt INTERFACE Qt5::WaylandClient)
if (DESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS)
target_include_directories(external_qt
INTERFACE
${DESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS}
${DESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS}/QtWaylandClient
)
else()
target_include_directories(external_qt
INTERFACE
${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS}
)
endif()
endif()
else()
target_include_directories(external_qt SYSTEM
INTERFACE
@ -120,15 +83,6 @@ else()
)
endif()
if (LINUX)
target_include_directories(external_qt SYSTEM
INTERFACE
${qt_loc}/include/QtThemeSupport
${qt_loc}/include/QtThemeSupport/${qt_version}
${qt_loc}/include/QtThemeSupport/${qt_version}/QtThemeSupport
)
endif()
target_compile_definitions(external_qt
INTERFACE
_REENTRANT
@ -161,13 +115,6 @@ else()
)
endif()
if (LINUX)
target_compile_definitions(external_qt
INTERFACE
QT_THEME_SUPPORT_LIB
)
endif()
if (WIN32)
set(qt_lib_prefix "")
set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
@ -255,7 +202,6 @@ else()
set(qt_libs_dbus_support lib/${qt_lib_prefix}Qt5LinuxAccessibilitySupport)
set(qt_libs_dbus_plugins
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
plugins/platformthemes/${qt_lib_prefix}qxdgdesktopportal
)
set(qt_libs_dbus_bearers
plugins/bearer/${qt_lib_prefix}qconnmanbearer
@ -267,11 +213,11 @@ else()
if (Qt5WaylandClient_FOUND)
set(qt_libs_waylandclient lib/${qt_lib_prefix}Qt5WaylandClient)
set(qt_libs_waylandclient_plugins
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
plugins/wayland-shell-integration/${qt_lib_prefix}wl-shell
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
plugins/platforms/${qt_lib_prefix}qwayland-egl
plugins/platforms/${qt_lib_prefix}qwayland-generic
plugins/platforms/${qt_lib_prefix}qwayland-egl
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
plugins/wayland-shell-integration/${qt_lib_prefix}wl-shell
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
)
endif()
set(qt_libs

View file

@ -22,7 +22,6 @@ if (LINUX)
target_link_libraries(external_qt_static_plugins
PUBLIC
desktop-app::external_nimf_qt5
desktop-app::external_qt5ct_support
)
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)

View file

@ -31,14 +31,13 @@ Q_IMPORT_PLUGIN(QSvgIconPlugin)
Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin)
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin)
Q_IMPORT_PLUGIN(QWaylandEglPlatformIntegrationPlugin)
Q_IMPORT_PLUGIN(QWaylandEglClientBufferPlugin)
Q_IMPORT_PLUGIN(QWaylandWlShellIntegrationPlugin)
Q_IMPORT_PLUGIN(QWaylandBradientDecorationPlugin)
Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin)
Q_IMPORT_PLUGIN(QWaylandEglPlatformIntegrationPlugin)
#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_UNIX
#endif // !DESKTOP_APP_USE_PACKAGED
@ -54,9 +53,4 @@ Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin)
Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
#endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY
#if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES
Q_IMPORT_PLUGIN(Qt5CTPlatformThemePlugin)
Q_IMPORT_PLUGIN(Qt5CTStylePlugin)
#endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES
#endif // Q_OS_UNIX && !Q_OS_MAC

View file

@ -1,18 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
add_library(external_qt5ct_support INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_qt5ct_support ALIAS external_qt5ct_support)
add_subdirectory(qt5ct)
add_subdirectory(qt5ct_qtplugin)
add_subdirectory(qt5ct_style)
target_link_libraries(external_qt5ct_support
INTERFACE
desktop-app::external_qt5ct_style
desktop-app::external_qt5ct_qtplugin
)

View file

@ -1,40 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
add_library(external_qt5ct INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_qt5ct ALIAS external_qt5ct)
else()
add_library(external_qt5ct STATIC)
add_library(desktop-app::external_qt5ct ALIAS external_qt5ct)
init_target(external_qt5ct "(external)")
set(qt5ct_loc ${third_party_loc}/qt5ct)
set(qt5ct_src ${qt5ct_loc}/src/qt5ct)
set_target_properties(external_qt5ct PROPERTIES AUTOMOC ON)
nice_target_sources(external_qt5ct ${qt5ct_src}
PRIVATE
qt5ct.cpp
qt5ct.h
)
target_include_directories(external_qt5ct
PRIVATE
${qt5ct_src}
)
target_include_directories(external_qt5ct
PUBLIC
${qt5ct_loc}/src
)
target_link_libraries(external_qt5ct
PRIVATE
desktop-app::external_qt
)
endif()

View file

@ -1,42 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
add_library(external_qt5ct_qtplugin INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_qt5ct_qtplugin ALIAS external_qt5ct_qtplugin)
else()
add_library(external_qt5ct_qtplugin STATIC)
add_library(desktop-app::external_qt5ct_qtplugin ALIAS external_qt5ct_qtplugin)
init_target(external_qt5ct_qtplugin "(external)")
set(qt5ct_loc ${third_party_loc}/qt5ct)
set(qt5ct_qtplugin_src ${qt5ct_loc}/src/qt5ct-qtplugin)
set_target_properties(external_qt5ct_qtplugin PROPERTIES AUTOMOC ON)
nice_target_sources(external_qt5ct_qtplugin ${qt5ct_qtplugin_src}
PRIVATE
main.cpp
qt5ctplatformtheme.cpp
qt5ctplatformtheme.h
)
target_include_directories(external_qt5ct_qtplugin
PRIVATE
${qt5ct_qtplugin_src}
)
target_compile_definitions(external_qt5ct_qtplugin
PRIVATE
QT_STATICPLUGIN
)
target_link_libraries(external_qt5ct_qtplugin
PRIVATE
desktop-app::external_qt5ct
desktop-app::external_qt
)
endif()

View file

@ -1,42 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
add_library(external_qt5ct_style INTERFACE IMPORTED GLOBAL)
add_library(desktop-app::external_qt5ct_style ALIAS external_qt5ct_style)
else()
add_library(external_qt5ct_style STATIC)
add_library(desktop-app::external_qt5ct_style ALIAS external_qt5ct_style)
init_target(external_qt5ct_style "(external)")
set(qt5ct_loc ${third_party_loc}/qt5ct)
set(qt5ct_style_src ${qt5ct_loc}/src/qt5ct-style)
set_target_properties(external_qt5ct_style PROPERTIES AUTOMOC ON)
nice_target_sources(external_qt5ct_style ${qt5ct_style_src}
PRIVATE
plugin.cpp
qt5ctproxystyle.cpp
qt5ctproxystyle.h
)
target_include_directories(external_qt5ct_style
PRIVATE
${qt5ct_style_src}
)
target_compile_definitions(external_qt5ct_style
PRIVATE
QT_STATICPLUGIN
)
target_link_libraries(external_qt5ct_style
PRIVATE
desktop-app::external_qt5ct
desktop-app::external_qt
)
endif()

View file

@ -63,13 +63,6 @@ if (DESKTOP_APP_USE_PACKAGED_LAZY)
)
endif()
if (DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
target_compile_definitions(common_options
INTERFACE
DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES
)
endif()
if (DESKTOP_APP_USE_PACKAGED_FONTS)
target_compile_definitions(common_options
INTERFACE

View file

@ -36,7 +36,6 @@ option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer (Linux only)." OFF)
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages. (Linux only)" OFF)
option(DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES "Bundle recommended Qt platform themes for self-contained packages. (Linux only)" ${DESKTOP_APP_USE_PACKAGED_LAZY})
option(DESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC "Link ffmpeg statically in packaged mode." OFF)
option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." ${osx_special_target})
option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target})
@ -44,7 +43,6 @@ option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate
option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF)
option(DESKTOP_APP_USE_ENCHANT "Use Enchant instead of bundled Hunspell. (Linux only)" OFF)
option(DESKTOP_APP_NO_PDB "Disable PDB file generation. (Windows only)" OFF)
set(DESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS "" CACHE STRING "QtWaylandClient headers location.")
set(dont_bundle_fonts 0)
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)