Build wayland suppport optionally
This commit is contained in:
parent
d9e8a608c2
commit
4436815d19
5 changed files with 50 additions and 20 deletions
2
external/CMakeLists.txt
vendored
2
external/CMakeLists.txt
vendored
|
|
@ -35,7 +35,7 @@ endif()
|
|||
add_checked_subdirectory(iconv)
|
||||
add_checked_subdirectory(jpeg)
|
||||
add_checked_subdirectory(lz4)
|
||||
if (LINUX)
|
||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
add_checked_subdirectory(materialdecoration)
|
||||
endif()
|
||||
add_checked_subdirectory(minizip)
|
||||
|
|
|
|||
36
external/qt/CMakeLists.txt
vendored
36
external/qt/CMakeLists.txt
vendored
|
|
@ -113,16 +113,22 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
if (Qt5WaylandClient_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()
|
||||
|
||||
if (LINUX)
|
||||
target_include_directories(external_qt SYSTEM
|
||||
INTERFACE
|
||||
${qt_loc}/include/QtSvg
|
||||
${qt_loc}/include/QtThemeSupport
|
||||
${qt_loc}/include/QtWaylandClient
|
||||
${qt_loc}/include/QtThemeSupport/${qt_version}
|
||||
${qt_loc}/include/QtWaylandClient/${qt_version}
|
||||
${qt_loc}/include/QtThemeSupport/${qt_version}/QtThemeSupport
|
||||
${qt_loc}/include/QtWaylandClient/${qt_version}/QtWaylandClient
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
@ -151,10 +157,16 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
if (LINUX)
|
||||
if (Qt5WaylandClient_FOUND)
|
||||
target_compile_definitions(external_qt
|
||||
INTERFACE
|
||||
QT_WAYLANDCLIENT_LIB
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LINUX)
|
||||
target_compile_definitions(external_qt
|
||||
INTERFACE
|
||||
QT_THEME_SUPPORT_LIB
|
||||
QT_SVG_LIB
|
||||
)
|
||||
|
|
@ -261,9 +273,11 @@ else()
|
|||
plugins/bearer/${qt_lib_prefix}qnmbearer
|
||||
)
|
||||
endif()
|
||||
set(qt_libs
|
||||
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
||||
${qt_libs_dbus_plugins}
|
||||
set(qt_libs_waylandclient)
|
||||
set(qt_libs_waylandclient_plugins)
|
||||
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}ivi-shell
|
||||
plugins/wayland-shell-integration/${qt_lib_prefix}wl-shell
|
||||
|
|
@ -276,6 +290,12 @@ else()
|
|||
plugins/wayland-graphics-integration-client/${qt_lib_prefix}shm-emulation-server
|
||||
plugins/platforms/${qt_lib_prefix}qwayland-egl
|
||||
plugins/platforms/${qt_lib_prefix}qwayland-generic
|
||||
)
|
||||
endif()
|
||||
set(qt_libs
|
||||
plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
|
||||
${qt_libs_dbus_plugins}
|
||||
${qt_libs_waylandclient_plugins}
|
||||
plugins/platforms/${qt_lib_prefix}qxcb
|
||||
plugins/imageformats/${qt_lib_prefix}qsvg
|
||||
plugins/iconengines/${qt_lib_prefix}qsvgicon
|
||||
|
|
@ -287,7 +307,7 @@ else()
|
|||
${qt_libs_dbus_support}
|
||||
plugins/bearer/${qt_lib_prefix}qgenericbearer
|
||||
${qt_libs_dbus_bearers}
|
||||
lib/${qt_lib_prefix}Qt5WaylandClient
|
||||
${qt_libs_waylandclient}
|
||||
lib/${qt_lib_prefix}Qt5ServiceSupport
|
||||
${common_qt_libs}
|
||||
${qt_libs_dbus}
|
||||
|
|
|
|||
2
external/qt/package.cmake
vendored
2
external/qt/package.cmake
vendored
|
|
@ -24,8 +24,10 @@ find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
|
|||
find_package(Qt5Gui COMPONENTS QWebpPlugin REQUIRED)
|
||||
|
||||
if (LINUX)
|
||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
find_package(Qt5 COMPONENTS WaylandClient REQUIRED)
|
||||
find_package(Qt5 OPTIONAL_COMPONENTS XkbCommonSupport QUIET)
|
||||
endif()
|
||||
|
||||
if (NOT DESKTOP_APP_USE_PACKAGED OR DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES)
|
||||
find_package(Qt5 COMPONENTS Svg REQUIRED)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,13 @@ if (DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
|||
)
|
||||
endif()
|
||||
|
||||
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
target_compile_definitions(common_options
|
||||
INTERFACE
|
||||
DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION
|
||||
)
|
||||
endif()
|
||||
|
||||
if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
|
||||
target_compile_definitions(common_options
|
||||
INTERFACE
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ endif()
|
|||
|
||||
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
|
||||
option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration (Linux only)." OFF)
|
||||
option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration (Linux only)." OFF)
|
||||
option(DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION "Disable all code for WebRTC integration." OFF)
|
||||
option(DESKTOP_APP_USE_GLIBC_WRAPS "Use wraps for new GLIBC features." OFF)
|
||||
option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." ${no_special_target})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue