Migrate from qt_static_plugins.cpp to the Qt6-pregenerated initializators
This commit is contained in:
parent
92ec041c38
commit
926c3119df
12 changed files with 112 additions and 65 deletions
5
external/fcitx5_qt/CMakeLists.txt
vendored
5
external/fcitx5_qt/CMakeLists.txt
vendored
|
|
@ -22,6 +22,11 @@ set(FCITX5_QT_EXTRA_PLUGIN_NAME "")
|
||||||
|
|
||||||
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 ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
PRIVATE
|
||||||
|
init.cpp
|
||||||
|
)
|
||||||
|
|
||||||
nice_target_sources(external_fcitx5_qt ${fcitx5_qt_src}
|
nice_target_sources(external_fcitx5_qt ${fcitx5_qt_src}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
qfcitxplatforminputcontext.cpp
|
qfcitxplatforminputcontext.cpp
|
||||||
|
|
|
||||||
10
external/fcitx5_qt/init.cpp
vendored
Normal file
10
external/fcitx5_qt/init.cpp
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
|
Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin)
|
||||||
5
external/fcitx_qt5/CMakeLists.txt
vendored
5
external/fcitx_qt5/CMakeLists.txt
vendored
|
|
@ -19,6 +19,11 @@ set(fcitx_qt5_src ${fcitx_qt5_loc}/qt${QT_VERSION_MAJOR}/platforminputcontext)
|
||||||
|
|
||||||
set_target_properties(external_fcitx_qt5 PROPERTIES AUTOMOC ON)
|
set_target_properties(external_fcitx_qt5 PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
nice_target_sources(external_fcitx_qt5 ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
PRIVATE
|
||||||
|
init.cpp
|
||||||
|
)
|
||||||
|
|
||||||
nice_target_sources(external_fcitx_qt5 ${fcitx_qt5_src}
|
nice_target_sources(external_fcitx_qt5 ${fcitx_qt5_src}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
fcitxinputcontextproxy.cpp
|
fcitxinputcontextproxy.cpp
|
||||||
|
|
|
||||||
10
external/fcitx_qt5/init.cpp
vendored
Normal file
10
external/fcitx_qt5/init.cpp
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
|
Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin)
|
||||||
5
external/hime_qt/CMakeLists.txt
vendored
5
external/hime_qt/CMakeLists.txt
vendored
|
|
@ -19,6 +19,11 @@ set(hime_qt_src ${hime_loc}/src/qt5-im)
|
||||||
|
|
||||||
set_target_properties(external_hime_qt PROPERTIES AUTOMOC ON)
|
set_target_properties(external_hime_qt PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
nice_target_sources(external_hime_qt ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
PRIVATE
|
||||||
|
init.cpp
|
||||||
|
)
|
||||||
|
|
||||||
nice_target_sources(external_hime_qt ${hime_qt_src}
|
nice_target_sources(external_hime_qt ${hime_qt_src}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
hime-imcontext-qt.cpp
|
hime-imcontext-qt.cpp
|
||||||
|
|
|
||||||
10
external/hime_qt/init.cpp
vendored
Normal file
10
external/hime_qt/init.cpp
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
|
Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
|
||||||
4
external/kimageformats/CMakeLists.txt
vendored
4
external/kimageformats/CMakeLists.txt
vendored
|
|
@ -30,6 +30,10 @@ DEPENDS
|
||||||
${kimageformats_src}/jxl.json
|
${kimageformats_src}/jxl.json
|
||||||
)
|
)
|
||||||
|
|
||||||
|
nice_target_sources(external_kimageformats ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
PRIVATE
|
||||||
|
init.cpp
|
||||||
|
)
|
||||||
nice_target_sources(external_kimageformats ${kimageformats_src}
|
nice_target_sources(external_kimageformats ${kimageformats_src}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
avif.cpp
|
avif.cpp
|
||||||
|
|
|
||||||
12
external/kimageformats/init.cpp
vendored
Normal file
12
external/kimageformats/init.cpp
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
|
Q_IMPORT_PLUGIN(QAVIFPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(HEIFPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QJpegXLPlugin)
|
||||||
5
external/nimf_qt5/CMakeLists.txt
vendored
5
external/nimf_qt5/CMakeLists.txt
vendored
|
|
@ -20,6 +20,11 @@ set(nimf_qt5_src ${nimf_loc}/modules/clients/qt5)
|
||||||
|
|
||||||
set_target_properties(external_nimf_qt5 PROPERTIES AUTOMOC ON)
|
set_target_properties(external_nimf_qt5 PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
nice_target_sources(external_nimf_qt5 ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
PRIVATE
|
||||||
|
init.cpp
|
||||||
|
)
|
||||||
|
|
||||||
nice_target_sources(external_nimf_qt5 ${nimf_qt5_src}
|
nice_target_sources(external_nimf_qt5 ${nimf_qt5_src}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
im-nimf-qt5.cpp
|
im-nimf-qt5.cpp
|
||||||
|
|
|
||||||
10
external/nimf_qt5/init.cpp
vendored
Normal file
10
external/nimf_qt5/init.cpp
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
|
Q_IMPORT_PLUGIN(NimfInputContextPlugin)
|
||||||
37
external/qt/CMakeLists.txt
vendored
37
external/qt/CMakeLists.txt
vendored
|
|
@ -149,6 +149,14 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(qt_libs_list "")
|
set(qt_libs_list "")
|
||||||
|
if (QT_VERSION_MAJOR GREATER_EQUAL 6)
|
||||||
|
list(APPEND qt_libs_list
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QWebpPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QJpegPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QGifPlugin_init>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_include_directories(external_qt SYSTEM
|
target_include_directories(external_qt SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
@ -186,12 +194,15 @@ elseif (APPLE)
|
||||||
plugins/tls/${qt_lib_prefix}qsecuretransportbackend
|
plugins/tls/${qt_lib_prefix}qsecuretransportbackend
|
||||||
plugins/networkinformation/${qt_lib_prefix}qscnetworkreachability
|
plugins/networkinformation/${qt_lib_prefix}qscnetworkreachability
|
||||||
)
|
)
|
||||||
|
list(APPEND qt_libs_list
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QSecureTransportBackendPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QSCNetworkReachabilityNetworkInformationPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin_resources_1>
|
||||||
|
)
|
||||||
foreach (lib ${qt_libs})
|
foreach (lib ${qt_libs})
|
||||||
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
||||||
endforeach()
|
endforeach()
|
||||||
list(APPEND qt_libs_list
|
|
||||||
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin_resources_1>
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
set(qt_libs
|
set(qt_libs
|
||||||
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
||||||
|
|
@ -204,6 +215,15 @@ else()
|
||||||
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}XcbQpa
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}XcbQpa
|
||||||
${common_qt_libs}
|
${common_qt_libs}
|
||||||
)
|
)
|
||||||
|
list(APPEND qt_libs_list
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QXcbIntegrationPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QXcbEglIntegrationPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QXcbGlxIntegrationPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QComposePlatformInputContextPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QSvgIconPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QGtk3ThemePlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QTlsBackendOpenSSLPlugin_init>
|
||||||
|
)
|
||||||
if (TARGET Qt::DBus)
|
if (TARGET Qt::DBus)
|
||||||
list(APPEND qt_libs
|
list(APPEND qt_libs
|
||||||
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
|
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
|
||||||
|
|
@ -211,6 +231,10 @@ else()
|
||||||
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}DBus
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}DBus
|
||||||
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Core
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Core
|
||||||
)
|
)
|
||||||
|
list(APPEND qt_libs_list
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QIbusPlatformInputContextPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QXdgDesktopPortalThemePlugin_init>
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||||
list(PREPEND qt_libs
|
list(PREPEND qt_libs
|
||||||
|
|
@ -222,6 +246,13 @@ else()
|
||||||
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}WaylandEglClientHwIntegration
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}WaylandEglClientHwIntegration
|
||||||
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}WaylandClient
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}WaylandClient
|
||||||
)
|
)
|
||||||
|
list(APPEND qt_libs_list
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QWaylandIntegrationPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QWaylandEglPlatformIntegrationPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QWaylandEglClientBufferPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QWaylandXdgShellIntegrationPlugin_init>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QWaylandBradientDecorationPlugin_init>
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
if (TARGET Qt::WaylandCompositor)
|
if (TARGET Qt::WaylandCompositor)
|
||||||
list(PREPEND qt_libs
|
list(PREPEND qt_libs
|
||||||
|
|
|
||||||
|
|
@ -7,70 +7,10 @@ https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||||
*/
|
*/
|
||||||
#include <QtCore/QtPlugin>
|
#include <QtCore/QtPlugin>
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_USE_PACKAGED
|
#if !defined DESKTOP_APP_USE_PACKAGED && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && defined Q_OS_WIN
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
Q_IMPORT_PLUGIN(QSecureTransportBackend)
|
|
||||||
Q_IMPORT_PLUGIN(QSCNetworkReachabilityNetworkInformationBackendFactory)
|
|
||||||
#else // Q_OS_MAC
|
|
||||||
Q_IMPORT_PLUGIN(QTlsBackendOpenSSL)
|
|
||||||
#endif // Q_OS_MAC
|
|
||||||
|
|
||||||
#else // Qt >= 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)
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
|
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
|
||||||
#elif defined Q_OS_MAC // Q_OS_WIN
|
#endif // !DESKTOP_APP_USE_PACKAGED && Qt < 6.0.0 && Q_OS_WIN
|
||||||
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
|
|
||||||
#elif defined Q_OS_UNIX // Q_OS_WIN | Q_OS_MAC
|
|
||||||
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QXcbEglIntegrationPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QXcbGlxIntegrationPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QSvgIconPlugin)
|
|
||||||
#ifdef QT_DBUS_LIB
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
|
|
||||||
#endif // Qt < 6.0.0
|
|
||||||
Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin)
|
|
||||||
#endif // QT_DBUS_LIB
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
|
||||||
Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QWaylandEglPlatformIntegrationPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QWaylandEglClientBufferPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QWaylandXdgShellIntegrationPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QWaylandBradientDecorationPlugin)
|
|
||||||
#endif // !DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
|
||||||
Q_IMPORT_PLUGIN(QGtk3ThemePlugin)
|
|
||||||
#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_UNIX
|
|
||||||
#endif // !DESKTOP_APP_USE_PACKAGED
|
|
||||||
|
|
||||||
#if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY
|
|
||||||
#if defined Q_OS_WIN || (defined Q_OS_UNIX && !defined Q_OS_MAC)
|
|
||||||
Q_IMPORT_PLUGIN(QAVIFPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(HEIFPlugin)
|
|
||||||
Q_IMPORT_PLUGIN(QJpegXLPlugin)
|
|
||||||
#endif // Q_OS_WIN || (Q_OS_UNIX && !Q_OS_MAC)
|
|
||||||
|
|
||||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
|
||||||
Q_IMPORT_PLUGIN(NimfInputContextPlugin)
|
|
||||||
#ifdef QT_DBUS_LIB
|
|
||||||
Q_IMPORT_PLUGIN(QFcitxPlatformInputContextPlugin)
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
|
||||||
Q_IMPORT_PLUGIN(QFcitx5PlatformInputContextPlugin)
|
|
||||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
|
||||||
#endif // QT_DBUS_LIB
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
|
||||||
Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
|
|
||||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
|
||||||
#endif // Q_OS_UNIX && !Q_OS_MAC
|
|
||||||
#endif // !DESKTOP_APP_USE_PACKAGED || DESKTOP_APP_USE_PACKAGED_LAZY
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue