Skip to content

Commit

Permalink
Some cleanup of unneeded hacks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ilya-fedin authored and john-preston committed Jun 20, 2021
1 parent 97b9c3f commit e002bba
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 225 deletions.
3 changes: 0 additions & 3 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
70 changes: 8 additions & 62 deletions external/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -69,18 +40,10 @@ 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()
target_include_directories(external_qt
INTERFACE
${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS}
)
endif()
else()
target_include_directories(external_qt SYSTEM
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion external/qt/qt_static_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 2 additions & 8 deletions external/qt/qt_static_plugins/qt_static_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
18 changes: 0 additions & 18 deletions external/qt5ct_support/CMakeLists.txt

This file was deleted.

40 changes: 0 additions & 40 deletions external/qt5ct_support/qt5ct/CMakeLists.txt

This file was deleted.

42 changes: 0 additions & 42 deletions external/qt5ct_support/qt5ct_qtplugin/CMakeLists.txt

This file was deleted.

42 changes: 0 additions & 42 deletions external/qt5ct_support/qt5ct_style/CMakeLists.txt

This file was deleted.

7 changes: 0 additions & 7 deletions options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions variables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ 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})
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)
Expand Down

0 comments on commit e002bba

Please sign in to comment.