Add qt5ct, qt5ct_qtplugin and qt5ct_style modules
This commit is contained in:
parent
27d29124a4
commit
bce16efbe6
6 changed files with 174 additions and 0 deletions
5
external/CMakeLists.txt
vendored
5
external/CMakeLists.txt
vendored
|
|
@ -42,6 +42,11 @@ add_checked_subdirectory(openal)
|
||||||
add_checked_subdirectory(openssl)
|
add_checked_subdirectory(openssl)
|
||||||
add_checked_subdirectory(opus)
|
add_checked_subdirectory(opus)
|
||||||
add_checked_subdirectory(qt)
|
add_checked_subdirectory(qt)
|
||||||
|
if (LINUX)
|
||||||
|
add_checked_subdirectory(qt5ct)
|
||||||
|
add_checked_subdirectory(qt5ct_qtplugin)
|
||||||
|
add_checked_subdirectory(qt5ct_style)
|
||||||
|
endif()
|
||||||
add_checked_subdirectory(qr_code_generator)
|
add_checked_subdirectory(qr_code_generator)
|
||||||
add_checked_subdirectory(ranges)
|
add_checked_subdirectory(ranges)
|
||||||
add_checked_subdirectory(rlottie)
|
add_checked_subdirectory(rlottie)
|
||||||
|
|
|
||||||
38
external/qt/CMakeLists.txt
vendored
38
external/qt/CMakeLists.txt
vendored
|
|
@ -30,6 +30,33 @@ if (DESKTOP_APP_USE_PACKAGED)
|
||||||
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
||||||
|
find_library(Qt5ThemeSupport_LIBRARY
|
||||||
|
NAMES
|
||||||
|
Qt5ThemeSupport
|
||||||
|
)
|
||||||
|
|
||||||
|
find_path(Qt5ThemeSupport_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
QtThemeSupport/private/qgenericunixthemes_p.h
|
||||||
|
HINTS
|
||||||
|
${Qt5Gui_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
QtThemeSupport/${Qt5Gui_VERSION}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(external_qt
|
||||||
|
INTERFACE
|
||||||
|
${Qt5ThemeSupport_LIBRARY}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(external_qt
|
||||||
|
INTERFACE
|
||||||
|
${Qt5ThemeSupport_INCLUDE_DIR}
|
||||||
|
${Qt5ThemeSupport_INCLUDE_DIR}/QtThemeSupport
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (Qt5WaylandClient_FOUND)
|
if (Qt5WaylandClient_FOUND)
|
||||||
target_link_libraries(external_qt INTERFACE Qt5::WaylandClient)
|
target_link_libraries(external_qt INTERFACE Qt5::WaylandClient)
|
||||||
|
|
||||||
|
|
@ -49,12 +76,15 @@ else()
|
||||||
${qt_loc}/include/QtCore
|
${qt_loc}/include/QtCore
|
||||||
${qt_loc}/include/QtGui
|
${qt_loc}/include/QtGui
|
||||||
${qt_loc}/include/QtWidgets
|
${qt_loc}/include/QtWidgets
|
||||||
|
${qt_loc}/include/QtThemeSupport
|
||||||
${qt_loc}/include/QtWaylandClient
|
${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}
|
||||||
|
${qt_loc}/include/QtThemeSupport/${qt_version}
|
||||||
${qt_loc}/include/QtWaylandClient/${qt_version}
|
${qt_loc}/include/QtWaylandClient/${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
|
||||||
|
${qt_loc}/include/QtThemeSupport/${qt_version}/QtThemeSupport
|
||||||
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
|
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -71,12 +101,20 @@ else()
|
||||||
QT_STATICPLUGIN
|
QT_STATICPLUGIN
|
||||||
QT_PLUGIN
|
QT_PLUGIN
|
||||||
QT_WAYLANDCLIENT_LIB
|
QT_WAYLANDCLIENT_LIB
|
||||||
|
QT_THEME_SUPPORT_LIB
|
||||||
QT_WIDGETS_LIB
|
QT_WIDGETS_LIB
|
||||||
QT_NETWORK_LIB
|
QT_NETWORK_LIB
|
||||||
QT_GUI_LIB
|
QT_GUI_LIB
|
||||||
QT_CORE_LIB
|
QT_CORE_LIB
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (Qt5DBus_FOUND)
|
||||||
|
target_compile_definitions(external_qt
|
||||||
|
INTERFACE
|
||||||
|
QT_DBUS_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)
|
||||||
|
|
|
||||||
40
external/qt5ct/CMakeLists.txt
vendored
Normal file
40
external/qt5ct/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
# 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 OBJECT)
|
||||||
|
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
|
||||||
|
PUBLIC
|
||||||
|
desktop-app::external_qt
|
||||||
|
)
|
||||||
|
endif()
|
||||||
42
external/qt5ct_qtplugin/CMakeLists.txt
vendored
Normal file
42
external/qt5ct_qtplugin/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
# 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()
|
||||||
42
external/qt5ct_style/CMakeLists.txt
vendored
Normal file
42
external/qt5ct_style/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
# 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()
|
||||||
|
|
@ -33,6 +33,13 @@ if (DESKTOP_APP_USE_PACKAGED_LAZY)
|
||||||
)
|
)
|
||||||
endif()
|
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)
|
if (DESKTOP_APP_USE_PACKAGED_FONTS)
|
||||||
target_compile_definitions(common_options
|
target_compile_definitions(common_options
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue