Use version-less Qt targets and functions whenever possible
This commit is contained in:
parent
c65bf3b134
commit
9615515b06
7 changed files with 133 additions and 468 deletions
7
external/fcitx5_qt/CMakeLists.txt
vendored
7
external/fcitx5_qt/CMakeLists.txt
vendored
|
|
@ -15,12 +15,7 @@ add_library(desktop-app::external_fcitx5_qt ALIAS external_fcitx5_qt)
|
||||||
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)
|
||||||
|
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt${QT_VERSION_MAJOR}/platforminputcontext)
|
||||||
if (DESKTOP_APP_QT6)
|
|
||||||
set(fcitx5_qt_src ${fcitx5_qt_loc}/qt6/platforminputcontext)
|
|
||||||
else()
|
|
||||||
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)
|
||||||
set(FCITX5_QT_EXTRA_PLUGIN_NAME "")
|
set(FCITX5_QT_EXTRA_PLUGIN_NAME "")
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,7 @@ add_library(desktop-app::external_fcitx5_qt_dbusaddons ALIAS external_fcitx5_qt_
|
||||||
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)
|
||||||
|
set(fcitx5_qt_dbusaddons_src ${fcitx5_qt_loc}/qt${QT_VERSION_MAJOR}/dbusaddons)
|
||||||
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)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(external_fcitx5_qt_dbusaddons PROPERTIES AUTOMOC ON)
|
set_target_properties(external_fcitx5_qt_dbusaddons PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
|
@ -40,12 +35,7 @@ PRIVATE
|
||||||
)
|
)
|
||||||
|
|
||||||
include(GenerateExportHeader)
|
include(GenerateExportHeader)
|
||||||
|
generate_export_header(external_fcitx5_qt_dbusaddons BASE_NAME Fcitx5Qt${QT_VERSION_MAJOR}DBusAddons)
|
||||||
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)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(external_fcitx5_qt_dbusaddons
|
target_include_directories(external_fcitx5_qt_dbusaddons
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|
@ -53,7 +43,7 @@ PUBLIC
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT DESKTOP_APP_QT6)
|
if (QT_VERSION_MAJOR EQUAL 5)
|
||||||
target_compile_definitions(external_fcitx5_qt_dbusaddons
|
target_compile_definitions(external_fcitx5_qt_dbusaddons
|
||||||
PRIVATE
|
PRIVATE
|
||||||
FCITX5QT5DBUSADDONS_STATIC_DEFINE
|
FCITX5QT5DBUSADDONS_STATIC_DEFINE
|
||||||
|
|
|
||||||
22
external/fcitx_qt5/CMakeLists.txt
vendored
22
external/fcitx_qt5/CMakeLists.txt
vendored
|
|
@ -15,12 +15,7 @@ add_library(desktop-app::external_fcitx_qt5 ALIAS external_fcitx_qt5)
|
||||||
init_target(external_fcitx_qt5 "(external)")
|
init_target(external_fcitx_qt5 "(external)")
|
||||||
|
|
||||||
set(fcitx_qt5_loc ${third_party_loc}/fcitx-qt5)
|
set(fcitx_qt5_loc ${third_party_loc}/fcitx-qt5)
|
||||||
|
set(fcitx_qt5_src ${fcitx_qt5_loc}/qt${QT_VERSION_MAJOR}/platforminputcontext)
|
||||||
if (DESKTOP_APP_QT6)
|
|
||||||
set(fcitx_qt5_src ${fcitx_qt5_loc}/qt6/platforminputcontext)
|
|
||||||
else()
|
|
||||||
set(fcitx_qt5_src ${fcitx_qt5_loc}/qt5/platforminputcontext)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(external_fcitx_qt5 PROPERTIES AUTOMOC ON)
|
set_target_properties(external_fcitx_qt5 PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
|
|
@ -43,17 +38,10 @@ INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
|
||||||
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml PROPERTIES
|
set_source_files_properties(${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml PROPERTIES
|
||||||
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
|
INCLUDE ${fcitx_qt5_src}/fcitxqtdbustypes.h)
|
||||||
|
|
||||||
if (DESKTOP_APP_QT6)
|
qt_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml inputcontextproxy)
|
||||||
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml inputcontextproxy)
|
qt_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml inputcontext1proxy)
|
||||||
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml inputcontext1proxy)
|
qt_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml inputmethodproxy)
|
||||||
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml inputmethodproxy)
|
qt_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml inputmethod1proxy)
|
||||||
qt6_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml inputmethod1proxy)
|
|
||||||
else()
|
|
||||||
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext.xml inputcontextproxy)
|
|
||||||
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputContext1.xml inputcontext1proxy)
|
|
||||||
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod.xml inputmethodproxy)
|
|
||||||
qt5_add_dbus_interface(fcitx_qt5_adaptors ${fcitx_qt5_src}/org.fcitx.Fcitx.InputMethod1.xml inputmethod1proxy)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_sources(external_fcitx_qt5 PRIVATE ${fcitx_qt5_adaptors})
|
target_sources(external_fcitx_qt5 PRIVATE ${fcitx_qt5_adaptors})
|
||||||
|
|
||||||
|
|
|
||||||
237
external/qt/CMakeLists.txt
vendored
237
external/qt/CMakeLists.txt
vendored
|
|
@ -4,50 +4,32 @@
|
||||||
# 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
|
||||||
Qt5::Core
|
Qt::Core
|
||||||
Qt5::CorePrivate
|
Qt::CorePrivate
|
||||||
Qt5::Gui
|
$<TARGET_NAME_IF_EXISTS:Qt::Core5Compat>
|
||||||
Qt5::GuiPrivate
|
Qt::Gui
|
||||||
Qt5::Widgets
|
Qt::GuiPrivate
|
||||||
Qt5::Network
|
$<TARGET_NAME_IF_EXISTS:Qt::OpenGL>
|
||||||
Qt5::Svg
|
Qt::Widgets
|
||||||
|
$<TARGET_NAME_IF_EXISTS:Qt::OpenGLWidgets>
|
||||||
|
Qt::Network
|
||||||
|
Qt::Svg
|
||||||
|
$<TARGET_NAME_IF_EXISTS:Qt::DBus>
|
||||||
|
$<TARGET_NAME_IF_EXISTS:Qt::XkbCommonSupport>
|
||||||
|
$<TARGET_NAME_IF_EXISTS:Qt::XkbCommonSupportPrivate>
|
||||||
|
$<TARGET_NAME_IF_EXISTS:Qt::WaylandClient>
|
||||||
|
$<TARGET_NAME_IF_EXISTS:Qt::WaylandClientPrivate>
|
||||||
|
$<TARGET_NAME_IF_EXISTS:Qt::WaylandGlobalPrivate>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (Qt5DBus_FOUND)
|
|
||||||
target_link_libraries(external_qt
|
|
||||||
INTERFACE
|
|
||||||
Qt5::DBus
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (Qt5XkbCommonSupport_FOUND)
|
|
||||||
target_link_libraries(external_qt
|
|
||||||
INTERFACE
|
|
||||||
Qt5::XkbCommonSupport
|
|
||||||
Qt5::XkbCommonSupportPrivate
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
|
||||||
target_link_libraries(external_qt
|
|
||||||
INTERFACE
|
|
||||||
Qt5::WaylandClient
|
|
||||||
Qt5::WaylandClientPrivate
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -55,73 +37,46 @@ target_include_directories(external_qt SYSTEM
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${qt_loc}/include
|
${qt_loc}/include
|
||||||
${qt_loc}/include/QtCore
|
${qt_loc}/include/QtCore
|
||||||
|
$<$<TARGET_EXISTS:Qt::Core5Compat>:${qt_loc}/include/QtCore5Compat>
|
||||||
${qt_loc}/include/QtGui
|
${qt_loc}/include/QtGui
|
||||||
|
$<$<TARGET_EXISTS:Qt::OpenGL>:${qt_loc}/include/QtOpenGL>
|
||||||
${qt_loc}/include/QtWidgets
|
${qt_loc}/include/QtWidgets
|
||||||
|
$<$<TARGET_EXISTS:Qt::OpenGLWidgets>:${qt_loc}/include/QtOpenGLWidgets>
|
||||||
${qt_loc}/include/QtSvg
|
${qt_loc}/include/QtSvg
|
||||||
|
$<$<TARGET_EXISTS:Qt::DBus>:${qt_loc}/include/QtDBus>
|
||||||
|
$<$<TARGET_EXISTS:Qt::XkbCommonSupport>:${qt_loc}/include/QtXkbCommonSupport>
|
||||||
|
$<$<TARGET_EXISTS:Qt::WaylandClient>:${qt_loc}/include/QtWaylandClient>
|
||||||
${qt_loc}/include/QtCore/${qt_version}
|
${qt_loc}/include/QtCore/${qt_version}
|
||||||
${qt_loc}/include/QtGui/${qt_version}
|
${qt_loc}/include/QtGui/${qt_version}
|
||||||
|
$<$<TARGET_EXISTS:Qt::XkbCommonSupportPrivate>:${qt_loc}/include/QtXkbCommonSupport/${qt_version}>
|
||||||
|
$<$<TARGET_EXISTS:Qt::WaylandClientPrivate>:${qt_loc}/include/QtWaylandClient/${qt_version}>
|
||||||
|
$<$<TARGET_EXISTS:Qt::WaylandGlobalPrivate>:${qt_loc}/include/QtWaylandGlobal/${qt_version}>
|
||||||
${qt_loc}/include/QtCore/${qt_version}/QtCore
|
${qt_loc}/include/QtCore/${qt_version}/QtCore
|
||||||
${qt_loc}/include/QtGui/${qt_version}/QtGui
|
${qt_loc}/include/QtGui/${qt_version}/QtGui
|
||||||
|
$<$<TARGET_EXISTS:Qt::XkbCommonSupportPrivate>:${qt_loc}/include/QtXkbCommonSupport/${qt_version}/QtXkbCommonSupport>
|
||||||
|
$<$<TARGET_EXISTS:Qt::WaylandClientPrivate>:${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient>
|
||||||
|
$<$<TARGET_EXISTS:Qt::WaylandGlobalPrivate>:${qt_loc}/include/QtWaylandGlobal/${qt_version}/QtWaylandGlobal>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (Qt5DBus_FOUND)
|
|
||||||
target_include_directories(external_qt SYSTEM
|
|
||||||
INTERFACE
|
|
||||||
${qt_loc}/include/QtDBus
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (Qt5XkbCommonSupport_FOUND)
|
|
||||||
target_include_directories(external_qt SYSTEM
|
|
||||||
INTERFACE
|
|
||||||
${qt_loc}/include/QtXkbCommonSupport
|
|
||||||
${qt_loc}/include/QtXkbCommonSupport/${qt_version}
|
|
||||||
${qt_loc}/include/QtXkbCommonSupport/${qt_version}/QtXkbCommonSupport
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
|
||||||
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
|
target_compile_definitions(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
_REENTRANT
|
_REENTRANT
|
||||||
QT_STATICPLUGIN
|
QT_STATICPLUGIN
|
||||||
QT_PLUGIN
|
QT_PLUGIN
|
||||||
QT_WIDGETS_LIB
|
|
||||||
QT_NETWORK_LIB
|
|
||||||
QT_GUI_LIB
|
|
||||||
QT_CORE_LIB
|
QT_CORE_LIB
|
||||||
|
$<$<TARGET_EXISTS:Qt::Core5Compat>:QT_CORE5COMPAT_LIB>
|
||||||
|
QT_GUI_LIB
|
||||||
|
$<$<TARGET_EXISTS:Qt::OpenGL>:QT_OPENGL_LIB>
|
||||||
|
QT_WIDGETS_LIB
|
||||||
|
$<$<TARGET_EXISTS:Qt::OpenGLWidgets>:QT_OPENGLWIDGETS_LIB>
|
||||||
|
QT_NETWORK_LIB
|
||||||
QT_SVG_LIB
|
QT_SVG_LIB
|
||||||
|
$<$<TARGET_EXISTS:Qt::DBus>:QT_DBUS_LIB>
|
||||||
|
$<$<TARGET_EXISTS:Qt::XkbCommonSupport>:QT_XKBCOMMON_SUPPORT_LIB>
|
||||||
|
$<$<TARGET_EXISTS:Qt::WaylandClient>:QT_WAYLANDCLIENT_LIB>
|
||||||
|
$<$<TARGET_EXISTS:Qt::WaylandGlobalPrivate>:QT_WAYLANDGLOBAL_LIB>
|
||||||
)
|
)
|
||||||
|
|
||||||
if (Qt5DBus_FOUND)
|
|
||||||
target_compile_definitions(external_qt
|
|
||||||
INTERFACE
|
|
||||||
QT_DBUS_LIB
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (Qt5XkbCommonSupport_FOUND)
|
|
||||||
target_compile_definitions(external_qt
|
|
||||||
INTERFACE
|
|
||||||
QT_XKBCOMMON_SUPPORT_LIB
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
|
||||||
target_compile_definitions(external_qt
|
|
||||||
INTERFACE
|
|
||||||
QT_WAYLANDCLIENT_LIB
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(qt_lib_prefix "")
|
set(qt_lib_prefix "")
|
||||||
set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
|
set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
|
||||||
|
|
@ -135,23 +90,48 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(common_qt_libs
|
set(common_qt_libs
|
||||||
plugins/bearer/${qt_lib_prefix}qgenericbearer
|
|
||||||
plugins/imageformats/${qt_lib_prefix}qwebp
|
plugins/imageformats/${qt_lib_prefix}qwebp
|
||||||
plugins/imageformats/${qt_lib_prefix}qgif
|
plugins/imageformats/${qt_lib_prefix}qgif
|
||||||
plugins/imageformats/${qt_lib_prefix}qjpeg
|
plugins/imageformats/${qt_lib_prefix}qjpeg
|
||||||
lib/${qt_lib_prefix}Qt5PrintSupport
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Svg
|
||||||
lib/${qt_lib_prefix}Qt5AccessibilitySupport
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Network
|
||||||
lib/${qt_lib_prefix}Qt5FontDatabaseSupport
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Widgets
|
||||||
lib/${qt_lib_prefix}Qt5EventDispatcherSupport
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Gui
|
||||||
lib/${qt_lib_prefix}Qt5ThemeSupport
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Core
|
||||||
lib/${qt_lib_prefix}Qt5Network
|
|
||||||
lib/${qt_lib_prefix}Qt5Widgets
|
|
||||||
lib/${qt_lib_prefix}Qt5Gui
|
|
||||||
lib/${qt_lib_prefix}Qt5Svg
|
|
||||||
lib/${qt_lib_prefix}qtharfbuzz
|
|
||||||
lib/${qt_lib_prefix}qtlibpng
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (TARGET Qt::Core5Compat)
|
||||||
|
list(PREPEND common_qt_libs
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Core5Compat
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (TARGET Qt::OpenGL)
|
||||||
|
list(PREPEND common_qt_libs
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}OpenGL
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (TARGET Qt::OpenGLWidgets)
|
||||||
|
list(PREPEND common_qt_libs
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}OpenGLWidgets
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (QT_VERSION_MAJOR GREATER_EQUAL 6)
|
||||||
|
list(APPEND common_qt_libs
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}BundledHarfbuzz
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}BundledLibpng
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}BundledPcre2
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
list(APPEND common_qt_libs
|
||||||
|
lib/${qt_lib_prefix}qtharfbuzz
|
||||||
|
lib/${qt_lib_prefix}qtlibpng
|
||||||
|
lib/${qt_lib_prefix}qtpcre2
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(qt_libs_list "")
|
set(qt_libs_list "")
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_include_directories(external_qt SYSTEM
|
target_include_directories(external_qt SYSTEM
|
||||||
|
|
@ -159,12 +139,15 @@ if (WIN32)
|
||||||
${qt_loc}/mkspecs/win32-msvc
|
${qt_loc}/mkspecs/win32-msvc
|
||||||
)
|
)
|
||||||
set(qt_libs
|
set(qt_libs
|
||||||
|
plugins/bearer/${qt_lib_prefix}qgenericbearer
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}AccessibilitySupport
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}FontDatabaseSupport
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}EventDispatcherSupport
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}ThemeSupport
|
||||||
${common_qt_libs}
|
${common_qt_libs}
|
||||||
lib/${qt_lib_prefix}Qt5Core
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}WindowsUIAutomationSupport
|
||||||
lib/${qt_lib_prefix}Qt5WindowsUIAutomationSupport
|
|
||||||
lib/${qt_lib_prefix}qtmain
|
lib/${qt_lib_prefix}qtmain
|
||||||
lib/${qt_lib_prefix}qtfreetype
|
lib/${qt_lib_prefix}qtfreetype
|
||||||
lib/${qt_lib_prefix}qtpcre2
|
|
||||||
plugins/platforms/${qt_lib_prefix}qwindows
|
plugins/platforms/${qt_lib_prefix}qwindows
|
||||||
)
|
)
|
||||||
foreach (lib ${qt_libs})
|
foreach (lib ${qt_libs})
|
||||||
|
|
@ -182,57 +165,46 @@ elseif (APPLE)
|
||||||
)
|
)
|
||||||
set(qt_libs
|
set(qt_libs
|
||||||
${common_qt_libs}
|
${common_qt_libs}
|
||||||
lib/${qt_lib_prefix}Qt5Core
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}BundledFreetype
|
||||||
lib/${qt_lib_prefix}Qt5GraphicsSupport
|
|
||||||
lib/${qt_lib_prefix}Qt5ClipboardSupport
|
|
||||||
lib/${qt_lib_prefix}qtfreetype
|
|
||||||
lib/${qt_lib_prefix}qtpcre2
|
|
||||||
plugins/platforms/${qt_lib_prefix}qcocoa
|
plugins/platforms/${qt_lib_prefix}qcocoa
|
||||||
|
plugins/tls/${qt_lib_prefix}qsecuretransportbackend
|
||||||
|
plugins/networkinformation/${qt_lib_prefix}qscnetworkreachability
|
||||||
)
|
)
|
||||||
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()
|
||||||
target_link_libraries(external_qt
|
list(APPEND qt_libs_list
|
||||||
INTERFACE
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin_resources_1>
|
||||||
cups
|
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set(qt_libs
|
set(qt_libs
|
||||||
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
||||||
plugins/platformthemes/${qt_lib_prefix}qgtk3
|
plugins/platformthemes/${qt_lib_prefix}qgtk3
|
||||||
plugins/platforms/${qt_lib_prefix}qxcb
|
plugins/platforms/${qt_lib_prefix}qxcb
|
||||||
|
plugins/tls/${qt_lib_prefix}qopensslbackend
|
||||||
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-egl-integration
|
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-egl-integration
|
||||||
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-glx-integration
|
plugins/xcbglintegrations/${qt_lib_prefix}qxcb-glx-integration
|
||||||
plugins/iconengines/${qt_lib_prefix}qsvgicon
|
plugins/iconengines/${qt_lib_prefix}qsvgicon
|
||||||
lib/${qt_lib_prefix}Qt5XcbQpa
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}XcbQpa
|
||||||
lib/${qt_lib_prefix}Qt5EglSupport
|
|
||||||
lib/${qt_lib_prefix}Qt5GlxSupport
|
|
||||||
lib/${qt_lib_prefix}Qt5ServiceSupport
|
|
||||||
lib/${qt_lib_prefix}Qt5EdidSupport
|
|
||||||
lib/${qt_lib_prefix}Qt5XkbCommonSupport
|
|
||||||
lib/${qt_lib_prefix}Qt5ServiceSupport
|
|
||||||
${common_qt_libs}
|
${common_qt_libs}
|
||||||
lib/${qt_lib_prefix}Qt5Core
|
|
||||||
lib/${qt_lib_prefix}qtpcre2
|
|
||||||
)
|
)
|
||||||
if (Qt5DBus_FOUND)
|
if (TARGET Qt::DBus)
|
||||||
list(APPEND qt_libs
|
list(APPEND qt_libs
|
||||||
plugins/bearer/${qt_lib_prefix}qconnmanbearer
|
|
||||||
plugins/bearer/${qt_lib_prefix}qnmbearer
|
|
||||||
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
|
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
|
||||||
plugins/platformthemes/${qt_lib_prefix}qxdgdesktopportal
|
plugins/platformthemes/${qt_lib_prefix}qxdgdesktopportal
|
||||||
lib/${qt_lib_prefix}Qt5LinuxAccessibilitySupport
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}DBus
|
||||||
lib/${qt_lib_prefix}Qt5DBus
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Core
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
if (TARGET Qt::WaylandClient)
|
||||||
list(PREPEND qt_libs
|
list(PREPEND qt_libs
|
||||||
plugins/platforms/${qt_lib_prefix}qwayland-generic
|
plugins/platforms/${qt_lib_prefix}qwayland-generic
|
||||||
plugins/platforms/${qt_lib_prefix}qwayland-egl
|
plugins/platforms/${qt_lib_prefix}qwayland-egl
|
||||||
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
|
plugins/wayland-graphics-integration-client/${qt_lib_prefix}qt-plugin-wayland-egl
|
||||||
plugins/wayland-shell-integration/${qt_lib_prefix}xdg-shell
|
plugins/wayland-shell-integration/${qt_lib_prefix}xdg-shell
|
||||||
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
|
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
|
||||||
lib/${qt_lib_prefix}Qt5WaylandClient
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}WaylandEglClientHwIntegration
|
||||||
|
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}WaylandClient
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
foreach (lib ${qt_libs})
|
foreach (lib ${qt_libs})
|
||||||
|
|
@ -240,6 +212,15 @@ else()
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (QT_VERSION_MAJOR GREATER_EQUAL 6)
|
||||||
|
list(APPEND qt_libs_list
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::Gui_resources_1>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::Widgets_resources_1>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::Widgets_resources_2>
|
||||||
|
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::Widgets_resources_3>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(external_qt
|
target_link_libraries(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${qt_libs_list}
|
${qt_libs_list}
|
||||||
|
|
@ -260,7 +241,6 @@ if (LINUX)
|
||||||
target_link_static_libraries(external_qt
|
target_link_static_libraries(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
proxy
|
proxy
|
||||||
epoxy
|
|
||||||
xkbcommon
|
xkbcommon
|
||||||
xkbcommon-x11
|
xkbcommon-x11
|
||||||
xcb-glx
|
xcb-glx
|
||||||
|
|
@ -271,15 +251,13 @@ if (LINUX)
|
||||||
xcb-render
|
xcb-render
|
||||||
xcb-image
|
xcb-image
|
||||||
xcb-xfixes
|
xcb-xfixes
|
||||||
xcb-xinerama
|
|
||||||
xcb-xinput
|
|
||||||
xcb-shape
|
xcb-shape
|
||||||
xcb-sync
|
xcb-sync
|
||||||
xcb-util
|
xcb-util
|
||||||
xcb-render-util
|
xcb-render-util
|
||||||
xcb-keysyms
|
xcb-keysyms
|
||||||
)
|
)
|
||||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
if (TARGET Qt::WaylandClient)
|
||||||
target_link_libraries(external_qt
|
target_link_libraries(external_qt
|
||||||
INTERFACE
|
INTERFACE
|
||||||
desktop-app::linux_wayland_helper
|
desktop-app::linux_wayland_helper
|
||||||
|
|
@ -290,8 +268,11 @@ if (LINUX)
|
||||||
desktop-app::linux_xcb_helper
|
desktop-app::linux_xcb_helper
|
||||||
fontconfig
|
fontconfig
|
||||||
freetype
|
freetype
|
||||||
|
EGL
|
||||||
|
GL
|
||||||
xcb
|
xcb
|
||||||
X11
|
X11
|
||||||
X11-xcb
|
X11-xcb
|
||||||
|
glib-2.0
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
31
external/qt/package.cmake
vendored
31
external/qt/package.cmake
vendored
|
|
@ -23,36 +23,33 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DESKTOP_APP_QT6)
|
if (DESKTOP_APP_QT6)
|
||||||
find_package(Qt6 COMPONENTS Core Core5Compat Gui OpenGL Widgets OpenGLWidgets Network Svg REQUIRED)
|
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||||
else()
|
else()
|
||||||
find_package(Qt5 COMPONENTS Core Gui Widgets Network Svg REQUIRED)
|
find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets Network Svg REQUIRED)
|
||||||
|
|
||||||
|
if (QT_VERSION_MAJOR GREATER_EQUAL 6)
|
||||||
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core5Compat OpenGL OpenGLWidgets REQUIRED)
|
||||||
endif()
|
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(Qt${QT_VERSION_MAJOR} COMPONENTS WaylandClient REQUIRED)
|
||||||
find_package(Qt6 COMPONENTS WaylandClient REQUIRED)
|
if (QT_VERSION_MAJOR GREATER_EQUAL 6)
|
||||||
find_package(Qt6 OPTIONAL_COMPONENTS WaylandGlobalPrivate QUIET)
|
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS WaylandGlobalPrivate QUIET)
|
||||||
else()
|
else()
|
||||||
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
|
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
|
||||||
find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ((NOT DESKTOP_APP_USE_PACKAGED
|
if ((NOT DESKTOP_APP_USE_PACKAGED
|
||||||
OR (DESKTOP_APP_USE_PACKAGED AND DESKTOP_APP_USE_PACKAGED_LAZY))
|
OR (DESKTOP_APP_USE_PACKAGED AND DESKTOP_APP_USE_PACKAGED_LAZY))
|
||||||
AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||||
if (DESKTOP_APP_QT6)
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS DBus REQUIRED)
|
||||||
find_package(Qt6 COMPONENTS DBus REQUIRED)
|
|
||||||
else()
|
|
||||||
find_package(Qt5 COMPONENTS DBus REQUIRED)
|
|
||||||
endif()
|
|
||||||
elseif (NOT DESKTOP_APP_USE_PACKAGED)
|
elseif (NOT DESKTOP_APP_USE_PACKAGED)
|
||||||
if (DESKTOP_APP_QT6)
|
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS DBus QUIET)
|
||||||
find_package(Qt6 OPTIONAL_COMPONENTS DBus QUIET)
|
|
||||||
else()
|
|
||||||
find_package(Qt5 OPTIONAL_COMPONENTS DBus QUIET)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
281
external/qt/qt6/CMakeLists.txt
vendored
281
external/qt/qt6/CMakeLists.txt
vendored
|
|
@ -1,281 +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_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::CorePrivate
|
|
||||||
Qt6::Core5Compat
|
|
||||||
Qt6::Gui
|
|
||||||
Qt6::GuiPrivate
|
|
||||||
Qt6::OpenGL
|
|
||||||
Qt6::Widgets
|
|
||||||
Qt6::OpenGLWidgets
|
|
||||||
Qt6::Network
|
|
||||||
Qt6::Svg
|
|
||||||
)
|
|
||||||
|
|
||||||
if (Qt6DBus_FOUND)
|
|
||||||
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
|
|
||||||
Qt6::WaylandClientPrivate
|
|
||||||
)
|
|
||||||
|
|
||||||
if (Qt6WaylandGlobalPrivate_FOUND)
|
|
||||||
target_link_libraries(external_qt
|
|
||||||
INTERFACE
|
|
||||||
Qt6::WaylandGlobalPrivate
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
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 (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()
|
|
||||||
|
|
||||||
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 (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
|
||||||
target_compile_definitions(external_qt
|
|
||||||
INTERFACE
|
|
||||||
QT_WAYLANDCLIENT_LIB
|
|
||||||
QT_WAYLANDGLOBAL_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()
|
|
||||||
|
|
||||||
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)
|
|
||||||
target_include_directories(external_qt SYSTEM
|
|
||||||
INTERFACE
|
|
||||||
${qt_loc}/mkspecs/win32-msvc
|
|
||||||
)
|
|
||||||
set(qt_libs
|
|
||||||
${common_qt_libs}
|
|
||||||
lib/${qt_lib_prefix}Qt6WindowsUIAutomationSupport
|
|
||||||
lib/${qt_lib_prefix}qtmain
|
|
||||||
lib/${qt_lib_prefix}Qt6BundledFreetype
|
|
||||||
plugins/platforms/${qt_lib_prefix}qwindows
|
|
||||||
plugins/tls/${qt_lib_prefix}qopensslbackend
|
|
||||||
)
|
|
||||||
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)
|
|
||||||
target_include_directories(external_qt SYSTEM
|
|
||||||
INTERFACE
|
|
||||||
${qt_loc}/mkspecs/macx-clang
|
|
||||||
)
|
|
||||||
set(qt_libs
|
|
||||||
${common_qt_libs}
|
|
||||||
lib/${qt_lib_prefix}Qt6BundledFreetype
|
|
||||||
plugins/platforms/${qt_lib_prefix}qcocoa
|
|
||||||
plugins/tls/${qt_lib_prefix}qsecuretransportbackend
|
|
||||||
plugins/networkinformation/${qt_lib_prefix}qscnetworkreachability
|
|
||||||
)
|
|
||||||
foreach (lib ${qt_libs})
|
|
||||||
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
|
||||||
endforeach()
|
|
||||||
list(APPEND qt_libs_list
|
|
||||||
$<TARGET_OBJECTS:Qt6::QCocoaIntegrationPlugin_resources_1>
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
set(qt_libs
|
|
||||||
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
|
||||||
plugins/platformthemes/${qt_lib_prefix}qgtk3
|
|
||||||
plugins/platforms/${qt_lib_prefix}qxcb
|
|
||||||
plugins/tls/${qt_lib_prefix}qopensslbackend
|
|
||||||
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
|
|
||||||
${common_qt_libs}
|
|
||||||
)
|
|
||||||
if (Qt6DBus_FOUND)
|
|
||||||
list(APPEND qt_libs
|
|
||||||
plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
|
|
||||||
plugins/platformthemes/${qt_lib_prefix}qxdgdesktopportal
|
|
||||||
lib/${qt_lib_prefix}Qt6DBus
|
|
||||||
lib/${qt_lib_prefix}Qt6Core
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
|
||||||
list(PREPEND qt_libs
|
|
||||||
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}xdg-shell
|
|
||||||
plugins/wayland-decoration-client/${qt_lib_prefix}bradient
|
|
||||||
lib/${qt_lib_prefix}Qt6WaylandEglClientHwIntegration
|
|
||||||
lib/${qt_lib_prefix}Qt6WaylandClient
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
foreach (lib ${qt_libs})
|
|
||||||
list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
list(APPEND qt_libs_list
|
|
||||||
$<TARGET_OBJECTS:Qt6::Gui_resources_1>
|
|
||||||
$<TARGET_OBJECTS:Qt6::Widgets_resources_1>
|
|
||||||
$<TARGET_OBJECTS:Qt6::Widgets_resources_2>
|
|
||||||
$<TARGET_OBJECTS:Qt6::Widgets_resources_3>
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(external_qt
|
|
||||||
INTERFACE
|
|
||||||
${qt_libs_list}
|
|
||||||
$<LINK_ONLY:desktop-app::external_openssl>
|
|
||||||
$<TARGET_FILE:desktop-app::external_openssl_ssl>
|
|
||||||
$<TARGET_FILE:desktop-app::external_openssl_crypto>
|
|
||||||
$<LINK_ONLY:desktop-app::external_jpeg>
|
|
||||||
$<TARGET_FILE:desktop-app::external_jpeg>
|
|
||||||
$<LINK_ONLY:desktop-app::external_zlib>
|
|
||||||
$<TARGET_FILE: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
|
|
||||||
xkbcommon
|
|
||||||
xkbcommon-x11
|
|
||||||
xcb-glx
|
|
||||||
xcb-xkb
|
|
||||||
xcb-randr
|
|
||||||
xcb-icccm
|
|
||||||
xcb-shm
|
|
||||||
xcb-render
|
|
||||||
xcb-image
|
|
||||||
xcb-xfixes
|
|
||||||
xcb-shape
|
|
||||||
xcb-sync
|
|
||||||
xcb-util
|
|
||||||
xcb-render-util
|
|
||||||
xcb-keysyms
|
|
||||||
)
|
|
||||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
|
||||||
target_link_libraries(external_qt
|
|
||||||
INTERFACE
|
|
||||||
desktop-app::linux_wayland_helper
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(external_qt
|
|
||||||
INTERFACE
|
|
||||||
desktop-app::linux_xcb_helper
|
|
||||||
fontconfig
|
|
||||||
freetype
|
|
||||||
EGL
|
|
||||||
GL
|
|
||||||
xcb
|
|
||||||
X11
|
|
||||||
X11-xcb
|
|
||||||
glib-2.0
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
@ -34,14 +34,9 @@ function(target_prepare_qrc target_name)
|
||||||
set(rcc_file ${target_name}.rcc)
|
set(rcc_file ${target_name}.rcc)
|
||||||
set(rcc_path "${CMAKE_BINARY_DIR}/${rcc_file}")
|
set(rcc_path "${CMAKE_BINARY_DIR}/${rcc_file}")
|
||||||
source_group(TREE ${CMAKE_BINARY_DIR} PREFIX Resources FILES ${rcc_path})
|
source_group(TREE ${CMAKE_BINARY_DIR} PREFIX Resources FILES ${rcc_path})
|
||||||
if (DESKTOP_APP_QT6)
|
|
||||||
set(rcc_binary Qt6::rcc)
|
|
||||||
else()
|
|
||||||
set(rcc_binary Qt5::rcc)
|
|
||||||
endif()
|
|
||||||
add_custom_command(OUTPUT ${rcc_path}
|
add_custom_command(OUTPUT ${rcc_path}
|
||||||
DEPENDS ${qrc_files}
|
DEPENDS ${qrc_files}
|
||||||
COMMAND ${rcc_binary} ${rcc_flags} -o ${rcc_path} ${qrc_files}
|
COMMAND Qt::rcc ${rcc_flags} -o ${rcc_path} ${qrc_files}
|
||||||
COMMAND_EXPAND_LISTS VERBATIM
|
COMMAND_EXPAND_LISTS VERBATIM
|
||||||
)
|
)
|
||||||
target_add_resource(${target_name} ${rcc_path})
|
target_add_resource(${target_name} ${rcc_path})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue