Add Qt 6 support
Tested on Linux only
This commit is contained in:
parent
c4e45be16c
commit
a8856aa831
12 changed files with 375 additions and 31 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
add_subdirectory(external)
|
add_subdirectory(external)
|
||||||
if (LINUX
|
if (LINUX
|
||||||
AND NOT DESKTOP_APP_USE_PACKAGED
|
AND NOT DESKTOP_APP_USE_PACKAGED
|
||||||
AND Qt5WaylandClient_FOUND)
|
AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
add_subdirectory(linux_wayland_helper)
|
add_subdirectory(linux_wayland_helper)
|
||||||
endif()
|
endif()
|
||||||
if (LINUX AND NOT DESKTOP_APP_USE_PACKAGED)
|
if (LINUX AND NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
|
|
|
||||||
10
external/CMakeLists.txt
vendored
10
external/CMakeLists.txt
vendored
|
|
@ -14,12 +14,14 @@ endmacro()
|
||||||
add_checked_subdirectory(angle)
|
add_checked_subdirectory(angle)
|
||||||
add_checked_subdirectory(auto_updates)
|
add_checked_subdirectory(auto_updates)
|
||||||
add_checked_subdirectory(crash_reports)
|
add_checked_subdirectory(crash_reports)
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION AND NOT DESKTOP_APP_QT6)
|
||||||
add_checked_subdirectory(dbusmenu_qt)
|
add_checked_subdirectory(dbusmenu_qt)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(expected)
|
add_checked_subdirectory(expected)
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
|
if (NOT DESKTOP_APP_QT6)
|
||||||
add_checked_subdirectory(fcitx_qt5)
|
add_checked_subdirectory(fcitx_qt5)
|
||||||
|
endif()
|
||||||
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
|
||||||
add_checked_subdirectory(fcitx5_qt)
|
add_checked_subdirectory(fcitx5_qt)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -30,7 +32,7 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
add_checked_subdirectory(glibmm)
|
add_checked_subdirectory(glibmm)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(gsl)
|
add_checked_subdirectory(gsl)
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
|
if (LINUX AND NOT DESKTOP_APP_DISABLE_X11_INTEGRATION AND NOT DESKTOP_APP_QT6)
|
||||||
add_checked_subdirectory(hime_qt)
|
add_checked_subdirectory(hime_qt)
|
||||||
endif()
|
endif()
|
||||||
if (add_hunspell_library)
|
if (add_hunspell_library)
|
||||||
|
|
@ -41,7 +43,7 @@ if (LINUX)
|
||||||
add_checked_subdirectory(jemalloc)
|
add_checked_subdirectory(jemalloc)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(jpeg)
|
add_checked_subdirectory(jpeg)
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION AND NOT DESKTOP_APP_QT6)
|
||||||
add_checked_subdirectory(kwayland)
|
add_checked_subdirectory(kwayland)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(lz4)
|
add_checked_subdirectory(lz4)
|
||||||
|
|
@ -57,7 +59,7 @@ add_checked_subdirectory(qr_code_generator)
|
||||||
add_checked_subdirectory(ranges)
|
add_checked_subdirectory(ranges)
|
||||||
add_checked_subdirectory(rlottie)
|
add_checked_subdirectory(rlottie)
|
||||||
add_checked_subdirectory(rnnoise)
|
add_checked_subdirectory(rnnoise)
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION AND NOT DESKTOP_APP_QT6)
|
||||||
add_checked_subdirectory(statusnotifieritem)
|
add_checked_subdirectory(statusnotifieritem)
|
||||||
endif()
|
endif()
|
||||||
add_checked_subdirectory(ton)
|
add_checked_subdirectory(ton)
|
||||||
|
|
|
||||||
10
external/fcitx5_qt/CMakeLists.txt
vendored
10
external/fcitx5_qt/CMakeLists.txt
vendored
|
|
@ -13,11 +13,21 @@ else()
|
||||||
init_target(external_fcitx5_qt "(external)")
|
init_target(external_fcitx5_qt "(external)")
|
||||||
|
|
||||||
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
|
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_QT6)
|
||||||
|
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt6/platforminputcontext)
|
||||||
|
else()
|
||||||
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt5/platforminputcontext)
|
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt5/platforminputcontext)
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(external_fcitx5_qt PROPERTIES AUTOMOC ON)
|
set_target_properties(external_fcitx5_qt PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_QT6)
|
||||||
|
set(FCITX5_QT_EXTRA_PLUGIN_NAME "\"fcitx\",")
|
||||||
|
else()
|
||||||
set(FCITX5_QT_EXTRA_PLUGIN_NAME "")
|
set(FCITX5_QT_EXTRA_PLUGIN_NAME "")
|
||||||
|
endif()
|
||||||
|
|
||||||
configure_file("${fcitx5_qt_src}/fcitx5.json.in" "${CMAKE_CURRENT_BINARY_DIR}/fcitx5.json")
|
configure_file("${fcitx5_qt_src}/fcitx5.json.in" "${CMAKE_CURRENT_BINARY_DIR}/fcitx5.json")
|
||||||
|
|
||||||
nice_target_sources(external_fcitx5_qt ${fcitx5_qt_src}
|
nice_target_sources(external_fcitx5_qt ${fcitx5_qt_src}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,12 @@ else()
|
||||||
init_target(external_fcitx5_qt_dbusaddons "(external)")
|
init_target(external_fcitx5_qt_dbusaddons "(external)")
|
||||||
|
|
||||||
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
|
set(fcitx5_qt_loc ${third_party_loc}/fcitx5-qt)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_QT6)
|
||||||
|
set(fcitx5_qt_dbusaddons_src ${fcitx5_qt_loc}/qt6/dbusaddons)
|
||||||
|
else()
|
||||||
set(fcitx5_qt_dbusaddons_src ${fcitx5_qt_loc}/qt5/dbusaddons)
|
set(fcitx5_qt_dbusaddons_src ${fcitx5_qt_loc}/qt5/dbusaddons)
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(external_fcitx5_qt_dbusaddons PROPERTIES AUTOMOC ON)
|
set_target_properties(external_fcitx5_qt_dbusaddons PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
|
@ -33,7 +38,12 @@ else()
|
||||||
)
|
)
|
||||||
|
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_QT6)
|
||||||
|
generate_export_header(external_fcitx5_qt_dbusaddons BASE_NAME Fcitx5Qt6DBusAddons)
|
||||||
|
else()
|
||||||
generate_export_header(external_fcitx5_qt_dbusaddons BASE_NAME Fcitx5Qt5DBusAddons)
|
generate_export_header(external_fcitx5_qt_dbusaddons BASE_NAME Fcitx5Qt5DBusAddons)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(external_fcitx5_qt_dbusaddons
|
target_include_directories(external_fcitx5_qt_dbusaddons
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|
@ -41,10 +51,12 @@ else()
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOT DESKTOP_APP_QT6)
|
||||||
target_compile_definitions(external_fcitx5_qt_dbusaddons
|
target_compile_definitions(external_fcitx5_qt_dbusaddons
|
||||||
PRIVATE
|
PRIVATE
|
||||||
FCITX5QT5DBUSADDONS_STATIC_DEFINE
|
FCITX5QT5DBUSADDONS_STATIC_DEFINE
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(external_fcitx5_qt_dbusaddons
|
target_link_libraries(external_fcitx5_qt_dbusaddons
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
|
|
||||||
8
external/qt/CMakeLists.txt
vendored
8
external/qt/CMakeLists.txt
vendored
|
|
@ -4,11 +4,15 @@
|
||||||
# For license and copyright information please follow this link:
|
# For license and copyright information please follow this link:
|
||||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
|
|
||||||
|
add_subdirectory(qt_static_plugins)
|
||||||
|
if (DESKTOP_APP_QT6)
|
||||||
|
add_subdirectory(qt6)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(external_qt INTERFACE IMPORTED GLOBAL)
|
add_library(external_qt INTERFACE IMPORTED GLOBAL)
|
||||||
add_library(desktop-app::external_qt ALIAS external_qt)
|
add_library(desktop-app::external_qt ALIAS external_qt)
|
||||||
|
|
||||||
add_subdirectory(qt_static_plugins)
|
|
||||||
|
|
||||||
if (DESKTOP_APP_USE_PACKAGED)
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
target_link_libraries(external_qt
|
target_link_libraries(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
|
||||||
29
external/qt/package.cmake
vendored
29
external/qt/package.cmake
vendored
|
|
@ -5,7 +5,11 @@
|
||||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
|
|
||||||
if (NOT DESKTOP_APP_USE_PACKAGED)
|
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
|
if (DESKTOP_APP_QT6)
|
||||||
|
set(qt_version 6.2.0)
|
||||||
|
else()
|
||||||
set(qt_version 5.15.2)
|
set(qt_version 5.15.2)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(qt_loc ${libs_loc}/Qt-${qt_version})
|
set(qt_loc ${libs_loc}/Qt-${qt_version})
|
||||||
|
|
@ -15,23 +19,38 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
set(qt_loc /usr/local/desktop-app/Qt-${qt_version})
|
set(qt_loc /usr/local/desktop-app/Qt-${qt_version})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(Qt5_DIR ${qt_loc}/lib/cmake/Qt5)
|
set(CMAKE_PREFIX_PATH ${qt_loc})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core Gui Widgets Network Svg REQUIRED)
|
if (DESKTOP_APP_QT6)
|
||||||
find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED)
|
find_package(Qt6 COMPONENTS Core Core5Compat Gui OpenGL Widgets OpenGLWidgets Network Svg REQUIRED)
|
||||||
|
else()
|
||||||
|
find_package(Qt5 COMPONENTS Core Gui Widgets Network Svg REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (LINUX)
|
if (LINUX)
|
||||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
|
if (DESKTOP_APP_QT6)
|
||||||
|
find_package(Qt6 COMPONENTS WaylandClient REQUIRED)
|
||||||
|
else()
|
||||||
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
|
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
|
||||||
find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
|
find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
find_package(Qt5 OPTIONAL_COMPONENTS DBus QUIET)
|
if (DESKTOP_APP_QT6)
|
||||||
|
find_package(Qt6 COMPONENTS DBus REQUIRED)
|
||||||
else()
|
else()
|
||||||
find_package(Qt5 COMPONENTS DBus REQUIRED)
|
find_package(Qt5 COMPONENTS DBus REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
elseif (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
|
if (DESKTOP_APP_QT6)
|
||||||
|
find_package(Qt6 OPTIONAL_COMPONENTS DBus QUIET)
|
||||||
|
else()
|
||||||
|
find_package(Qt5 OPTIONAL_COMPONENTS DBus QUIET)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "(gen)")
|
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "(gen)")
|
||||||
|
|
|
||||||
276
external/qt/qt6/CMakeLists.txt
vendored
Normal file
276
external/qt/qt6/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,276 @@
|
||||||
|
# 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_qt INTERFACE IMPORTED GLOBAL)
|
||||||
|
add_library(desktop-app::external_qt ALIAS external_qt)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED)
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
Qt6::Core
|
||||||
|
Qt6::Core5Compat
|
||||||
|
Qt6::Gui
|
||||||
|
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)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (Qt6WaylandClient_FOUND)
|
||||||
|
target_link_libraries(external_qt INTERFACE Qt6::WaylandClient)
|
||||||
|
|
||||||
|
target_include_directories(external_qt SYSTEM
|
||||||
|
INTERFACE
|
||||||
|
${Qt6WaylandClient_PRIVATE_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
target_include_directories(external_qt SYSTEM
|
||||||
|
INTERFACE
|
||||||
|
${qt_loc}/include
|
||||||
|
${qt_loc}/include/QtCore
|
||||||
|
${qt_loc}/include/QtCore5Compat
|
||||||
|
${qt_loc}/include/QtGui
|
||||||
|
${qt_loc}/include/QtOpenGL
|
||||||
|
${qt_loc}/include/QtWidgets
|
||||||
|
${qt_loc}/include/QtOpenGLWidgets
|
||||||
|
${qt_loc}/include/QtSvg
|
||||||
|
${qt_loc}/include/QtCore/${qt_version}
|
||||||
|
${qt_loc}/include/QtGui/${qt_version}
|
||||||
|
${qt_loc}/include/QtCore/${qt_version}/QtCore
|
||||||
|
${qt_loc}/include/QtGui/${qt_version}/QtGui
|
||||||
|
)
|
||||||
|
|
||||||
|
if (Qt6DBus_FOUND)
|
||||||
|
target_include_directories(external_qt SYSTEM
|
||||||
|
INTERFACE
|
||||||
|
${qt_loc}/include/QtDBus
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (Qt6WaylandClient_FOUND)
|
||||||
|
target_include_directories(external_qt SYSTEM
|
||||||
|
INTERFACE
|
||||||
|
${qt_loc}/include/QtWaylandClient
|
||||||
|
${qt_loc}/include/QtWaylandClient/${qt_version}
|
||||||
|
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_compile_definitions(external_qt
|
||||||
|
INTERFACE
|
||||||
|
_REENTRANT
|
||||||
|
QT_STATICPLUGIN
|
||||||
|
QT_PLUGIN
|
||||||
|
QT_SVG_LIB
|
||||||
|
QT_NETWORK_LIB
|
||||||
|
QT_OPENGLWIDGETS_LIB
|
||||||
|
QT_WIDGETS_LIB
|
||||||
|
QT_OPENGL_LIB
|
||||||
|
QT_GUI_LIB
|
||||||
|
QT_CORE5COMPAT_LIB
|
||||||
|
QT_CORE_LIB
|
||||||
|
)
|
||||||
|
|
||||||
|
if (Qt6DBus_FOUND)
|
||||||
|
target_compile_definitions(external_qt
|
||||||
|
INTERFACE
|
||||||
|
QT_DBUS_LIB
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (Qt6WaylandClient_FOUND)
|
||||||
|
target_compile_definitions(external_qt
|
||||||
|
INTERFACE
|
||||||
|
QT_WAYLANDCLIENT_LIB
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set(qt_lib_prefix "")
|
||||||
|
set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
|
||||||
|
else()
|
||||||
|
set(qt_lib_prefix lib)
|
||||||
|
if (APPLE)
|
||||||
|
set(qt_lib_suffix $<$<CONFIG:Debug>:_debug>.a)
|
||||||
|
else()
|
||||||
|
set(qt_lib_suffix .a)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (LINUX)
|
||||||
|
set(qt_lib_objects objects-RelWithDebInfo)
|
||||||
|
else()
|
||||||
|
set(qt_lib_objects objects-$<IF:$<CONFIG:Debug>,Debug,RelWithDebInfo>)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(common_qt_libs
|
||||||
|
plugins/imageformats/${qt_lib_prefix}qwebp
|
||||||
|
plugins/imageformats/${qt_lib_prefix}qgif
|
||||||
|
plugins/imageformats/${qt_lib_prefix}qjpeg
|
||||||
|
lib/${qt_lib_prefix}Qt6Svg
|
||||||
|
lib/${qt_lib_prefix}Qt6Network
|
||||||
|
lib/${qt_lib_prefix}Qt6OpenGLWidgets
|
||||||
|
lib/${qt_lib_prefix}Qt6Widgets
|
||||||
|
lib/${qt_lib_prefix}Qt6OpenGL
|
||||||
|
lib/${qt_lib_prefix}Qt6Gui
|
||||||
|
lib/${qt_lib_prefix}Qt6Core5Compat
|
||||||
|
lib/${qt_lib_prefix}Qt6Core
|
||||||
|
lib/${qt_lib_prefix}Qt6BundledHarfbuzz
|
||||||
|
lib/${qt_lib_prefix}Qt6BundledLibpng
|
||||||
|
lib/${qt_lib_prefix}Qt6BundledPcre2
|
||||||
|
)
|
||||||
|
|
||||||
|
set(qt_libs_list "")
|
||||||
|
if (WIN32)
|
||||||
|
set(qt_libs
|
||||||
|
${common_qt_libs}
|
||||||
|
lib/${qt_lib_prefix}Qt6WindowsUIAutomationSupport
|
||||||
|
lib/${qt_lib_prefix}qtmain
|
||||||
|
lib/${qt_lib_prefix}qtfreetype
|
||||||
|
plugins/platforms/${qt_lib_prefix}qwindows
|
||||||
|
)
|
||||||
|
foreach (lib ${qt_libs})
|
||||||
|
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
desktop-app::external_angle
|
||||||
|
)
|
||||||
|
elseif (APPLE)
|
||||||
|
set(qt_libs
|
||||||
|
${common_qt_libs}
|
||||||
|
lib/${qt_lib_prefix}Qt6GraphicsSupport
|
||||||
|
lib/${qt_lib_prefix}Qt6ClipboardSupport
|
||||||
|
lib/${qt_lib_prefix}qtfreetype
|
||||||
|
plugins/platforms/${qt_lib_prefix}qcocoa
|
||||||
|
)
|
||||||
|
foreach (lib ${qt_libs})
|
||||||
|
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
set(qt_libs_dbus)
|
||||||
|
set(qt_libs_dbus_plugins)
|
||||||
|
if (Qt6DBus_FOUND)
|
||||||
|
set(qt_libs_dbus
|
||||||
|
lib/${qt_lib_prefix}Qt6DBus
|
||||||
|
lib/${qt_lib_prefix}Qt6Core
|
||||||
|
)
|
||||||
|
set(qt_libs_dbus_plugins
|
||||||
|
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
set(qt_libs_waylandclient)
|
||||||
|
set(qt_libs_waylandclient_plugins)
|
||||||
|
if (Qt6WaylandClient_FOUND)
|
||||||
|
set(qt_libs_waylandclient
|
||||||
|
lib/${qt_lib_prefix}Qt6WaylandEglClientHwIntegration
|
||||||
|
lib/${qt_lib_prefix}Qt6WaylandClient
|
||||||
|
)
|
||||||
|
set(qt_libs_waylandclient_plugins
|
||||||
|
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-decoration-client/${qt_lib_prefix}bradient
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
set(qt_libs
|
||||||
|
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
||||||
|
${qt_libs_dbus_plugins}
|
||||||
|
${qt_libs_waylandclient_plugins}
|
||||||
|
plugins/platformthemes/${qt_lib_prefix}qgtk3
|
||||||
|
plugins/platforms/${qt_lib_prefix}qxcb
|
||||||
|
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-egl-integration
|
||||||
|
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-glx-integration
|
||||||
|
plugins/iconengines/${qt_lib_prefix}qsvgicon
|
||||||
|
lib/${qt_lib_prefix}Qt6XcbQpa
|
||||||
|
${qt_libs_waylandclient}
|
||||||
|
${common_qt_libs}
|
||||||
|
${qt_libs_dbus}
|
||||||
|
)
|
||||||
|
foreach (lib ${qt_libs})
|
||||||
|
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND qt_libs_list
|
||||||
|
"${qt_loc}/lib/${qt_lib_objects}/Gui_resources_1/.rcc/qrc_qpdf.cpp.o"
|
||||||
|
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_1/.rcc/qrc_qstyle.cpp.o"
|
||||||
|
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_2/.rcc/qrc_qstyle1.cpp.o"
|
||||||
|
"${qt_loc}/lib/${qt_lib_objects}/Widgets_resources_3/.rcc/qrc_qmessagebox.cpp.o"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
${qt_libs_list}
|
||||||
|
$<TARGET_FILE:desktop-app::external_openssl_ssl>
|
||||||
|
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
||||||
|
desktop-app::external_jpeg
|
||||||
|
desktop-app::external_zlib
|
||||||
|
)
|
||||||
|
|
||||||
|
if (LINUX)
|
||||||
|
target_include_directories(external_qt SYSTEM
|
||||||
|
INTERFACE
|
||||||
|
${qt_loc}/mkspecs/linux-g++
|
||||||
|
)
|
||||||
|
target_link_static_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
proxy
|
||||||
|
epoxy
|
||||||
|
xkbcommon
|
||||||
|
xkbcommon-x11
|
||||||
|
xcb-glx
|
||||||
|
xcb-xkb
|
||||||
|
xcb-randr
|
||||||
|
xcb-icccm
|
||||||
|
xcb-shm
|
||||||
|
xcb-render
|
||||||
|
xcb-image
|
||||||
|
xcb-xfixes
|
||||||
|
xcb-xinput
|
||||||
|
xcb-shape
|
||||||
|
xcb-sync
|
||||||
|
xcb-util
|
||||||
|
xcb-render-util
|
||||||
|
xcb-keysyms
|
||||||
|
z
|
||||||
|
)
|
||||||
|
if (Qt6WaylandClient_FOUND)
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
desktop-app::linux_wayland_helper
|
||||||
|
$<TARGET_FILE:desktop-app::linux_wayland_helper>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
desktop-app::linux_gtk_helper
|
||||||
|
$<TARGET_FILE:desktop-app::linux_gtk_helper>
|
||||||
|
desktop-app::linux_glib_helper
|
||||||
|
$<TARGET_FILE:desktop-app::linux_glib_helper>
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
xcb
|
||||||
|
X11
|
||||||
|
X11-xcb
|
||||||
|
${CMAKE_DL_LIBS}
|
||||||
|
pthread
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
4
external/qt/qt_static_plugins/CMakeLists.txt
vendored
4
external/qt/qt_static_plugins/CMakeLists.txt
vendored
|
|
@ -25,10 +25,12 @@ if (LINUX)
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
|
if (NOT DESKTOP_APP_QT6)
|
||||||
target_link_libraries(external_qt_static_plugins
|
target_link_libraries(external_qt_static_plugins
|
||||||
PUBLIC
|
PUBLIC
|
||||||
desktop-app::external_fcitx_qt5
|
desktop-app::external_fcitx_qt5
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
|
||||||
target_link_libraries(external_qt_static_plugins
|
target_link_libraries(external_qt_static_plugins
|
||||||
|
|
@ -38,7 +40,7 @@ if (LINUX)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_X11_INTEGRATION AND NOT DESKTOP_APP_QT6)
|
||||||
target_link_libraries(external_qt_static_plugins
|
target_link_libraries(external_qt_static_plugins
|
||||||
PUBLIC
|
PUBLIC
|
||||||
desktop-app::external_hime_qt
|
desktop-app::external_hime_qt
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,10 @@ https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
#include <QtCore/QtPlugin>
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_USE_PACKAGED
|
#ifndef DESKTOP_APP_USE_PACKAGED
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
|
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
|
||||||
|
#endif // Qt < 6.0.0
|
||||||
|
|
||||||
Q_IMPORT_PLUGIN(QWebpPlugin)
|
Q_IMPORT_PLUGIN(QWebpPlugin)
|
||||||
Q_IMPORT_PLUGIN(QJpegPlugin)
|
Q_IMPORT_PLUGIN(QJpegPlugin)
|
||||||
Q_IMPORT_PLUGIN(QGifPlugin)
|
Q_IMPORT_PLUGIN(QGifPlugin)
|
||||||
|
|
@ -24,8 +27,10 @@ Q_IMPORT_PLUGIN(QXcbGlxIntegrationPlugin)
|
||||||
Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin)
|
Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin)
|
||||||
Q_IMPORT_PLUGIN(QSvgIconPlugin)
|
Q_IMPORT_PLUGIN(QSvgIconPlugin)
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
|
Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
|
||||||
Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
|
Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
|
||||||
|
#endif // Qt < 6.0.0
|
||||||
Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
|
Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
||||||
|
|
@ -42,13 +47,17 @@ Q_IMPORT_PLUGIN(QGtk3ThemePlugin)
|
||||||
#if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY
|
#if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
Q_IMPORT_PLUGIN(NimfInputContextPlugin)
|
Q_IMPORT_PLUGIN(NimfInputContextPlugin)
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin)
|
Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin)
|
||||||
|
#endif // Qt < 6.0.0
|
||||||
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||||
Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin)
|
Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin)
|
||||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
|
Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
|
||||||
|
#endif // Qt < 6.0.0
|
||||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||||
#endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY
|
#endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY
|
||||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
#endif // Q_OS_UNIX && !Q_OS_MAC
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ guint (*g_log_set_handler)(
|
||||||
GMainContext* (*g_main_context_default)(void);
|
GMainContext* (*g_main_context_default)(void);
|
||||||
gboolean (*g_main_context_iteration)(GMainContext* context, gboolean may_block);
|
gboolean (*g_main_context_iteration)(GMainContext* context, gboolean may_block);
|
||||||
GMainContext* (*g_main_context_new)(void);
|
GMainContext* (*g_main_context_new)(void);
|
||||||
|
// TODO: Remove when Qt 5 support will be dropped
|
||||||
gboolean (*g_main_context_pending)(GMainContext* context);
|
gboolean (*g_main_context_pending)(GMainContext* context);
|
||||||
void (*g_main_context_pop_thread_default)(GMainContext* context);
|
void (*g_main_context_pop_thread_default)(GMainContext* context);
|
||||||
void (*g_main_context_push_thread_default)(GMainContext* context);
|
void (*g_main_context_push_thread_default)(GMainContext* context);
|
||||||
|
|
@ -46,6 +47,7 @@ void (*g_source_destroy)(GSource* source);
|
||||||
GSource* (*g_source_new)(GSourceFuncs* source_funcs, guint struct_size);
|
GSource* (*g_source_new)(GSourceFuncs* source_funcs, guint struct_size);
|
||||||
void (*g_source_remove_poll)(GSource* source, GPollFD* fd);
|
void (*g_source_remove_poll)(GSource* source, GPollFD* fd);
|
||||||
void (*g_source_set_can_recurse)(GSource* source, gboolean can_recurse);
|
void (*g_source_set_can_recurse)(GSource* source, gboolean can_recurse);
|
||||||
|
void (*g_source_set_name)(GSource* source, const char* name);
|
||||||
void (*g_source_unref)(GSource* source);
|
void (*g_source_unref)(GSource* source);
|
||||||
int (*g_strcmp0)(const char* str1, const char* str2);
|
int (*g_strcmp0)(const char* str1, const char* str2);
|
||||||
|
|
||||||
|
|
@ -140,6 +142,7 @@ bool Resolve() {
|
||||||
&& LOAD_SYMBOL(lib, g_source_new)
|
&& LOAD_SYMBOL(lib, g_source_new)
|
||||||
&& LOAD_SYMBOL(lib, g_source_remove_poll)
|
&& LOAD_SYMBOL(lib, g_source_remove_poll)
|
||||||
&& LOAD_SYMBOL(lib, g_source_set_can_recurse)
|
&& LOAD_SYMBOL(lib, g_source_set_can_recurse)
|
||||||
|
&& LOAD_SYMBOL(lib, g_source_set_name)
|
||||||
&& LOAD_SYMBOL(lib, g_source_unref)
|
&& LOAD_SYMBOL(lib, g_source_unref)
|
||||||
&& LOAD_SYMBOL(lib, g_strcmp0)
|
&& LOAD_SYMBOL(lib, g_strcmp0)
|
||||||
&& LoadLibrary(lib, "libgobject-2.0.so.0")
|
&& LoadLibrary(lib, "libgobject-2.0.so.0")
|
||||||
|
|
@ -283,6 +286,11 @@ void g_source_set_can_recurse(GSource* source, gboolean can_recurse) {
|
||||||
GlibHelper::g_source_set_can_recurse(source, can_recurse);
|
GlibHelper::g_source_set_can_recurse(source, can_recurse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void g_source_set_name(GSource* source, const char* name) {
|
||||||
|
GlibHelper::Resolve();
|
||||||
|
GlibHelper::g_source_set_name(source, name);
|
||||||
|
}
|
||||||
|
|
||||||
void g_source_unref(GSource* source) {
|
void g_source_unref(GSource* source) {
|
||||||
GlibHelper::Resolve();
|
GlibHelper::Resolve();
|
||||||
GlibHelper::g_source_unref(source);
|
GlibHelper::g_source_unref(source);
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ INTERFACE
|
||||||
$<$<CONFIG:Debug>:_DEBUG>
|
$<$<CONFIG:Debug>:_DEBUG>
|
||||||
QT_NO_KEYWORDS
|
QT_NO_KEYWORDS
|
||||||
QT_NO_CAST_FROM_BYTEARRAY
|
QT_NO_CAST_FROM_BYTEARRAY
|
||||||
|
QT_IMPLICIT_QCHAR_CONSTRUCTION
|
||||||
)
|
)
|
||||||
|
|
||||||
if (DESKTOP_APP_DISABLE_CRASH_REPORTS)
|
if (DESKTOP_APP_DISABLE_CRASH_REPORTS)
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ 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_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_USE_ENCHANT "Use Enchant instead of bundled Hunspell. (Linux only)" OFF)
|
||||||
option(DESKTOP_APP_NO_PDB "Disable PDB file generation. (Windows only)" OFF)
|
option(DESKTOP_APP_NO_PDB "Disable PDB file generation. (Windows only)" OFF)
|
||||||
|
option(DESKTOP_APP_QT6 "Build with Qt 6" OFF)
|
||||||
|
|
||||||
set(dont_bundle_fonts 0)
|
set(dont_bundle_fonts 0)
|
||||||
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
|
if (DESKTOP_APP_USE_PACKAGED AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue