build: wayland support

This commit is contained in:
tobtoht
2024-11-03 17:42:34 +01:00
parent 0195bdc59c
commit 91cfdd6df8
18 changed files with 233 additions and 16 deletions
+15 -1
View File
@@ -18,6 +18,10 @@ if (WITH_SCANNER)
MultimediaWidgets)
endif()
IF (UNIX AND NOT APPLE)
list(APPEND QT_COMPONENTS WaylandClient)
endif()
find_package(Qt6 REQUIRED COMPONENTS ${QT_COMPONENTS})
if (CHECK_UPDATES)
@@ -292,12 +296,17 @@ if (WITH_SCANNER)
)
endif()
if(UNIX AND NOT APPLE)
target_link_libraries(feather PRIVATE Qt::WaylandClient)
endif()
if(STATIC AND APPLE)
target_link_libraries(feather PRIVATE Qt6::QDarwinCameraPermissionPlugin)
endif()
if(STATIC AND UNIX AND NOT APPLE)
target_link_libraries(feather PRIVATE Qt6::QComposePlatformInputContextPlugin)
target_link_libraries(feather PRIVATE Qt6::QWaylandIntegrationPlugin)
endif()
if(DEPENDS AND UNIX AND NOT APPLE)
@@ -305,6 +314,11 @@ if(DEPENDS AND UNIX AND NOT APPLE)
find_library(LIBXAU_LIBRARY Xau REQUIRED)
message(STATUS "libXau: libraries at ${LIBXAU_LIBRARY}")
target_link_libraries(XCB::XCB INTERFACE ${LIBXAU_LIBRARY})
# make sure Wayland::Client links to libffi
find_library(LIBFFI_LIBRARY ffi REQUIRED)
message(STATUS "libffi: libraries at ${LIBFFI_LIBRARY}")
target_link_libraries(Wayland::Client INTERFACE ${LIBFFI_LIBRARY})
endif()
if(STACK_TRACE AND CMAKE_C_COMPILER_ID STREQUAL "GNU")
@@ -339,4 +353,4 @@ if(APPLE)
file(COPY "${CMAKE_SOURCE_DIR}/src/assets/images/appicons/appicon.icns" DESTINATION "${CMAKE_SOURCE_DIR}/installed/feather.app/Contents/Resources/" )
endif()
qt_finalize_executable(feather)
qt_finalize_executable(feather)
+3
View File
@@ -29,6 +29,9 @@
#if defined(Q_OS_LINUX) && defined(STATIC)
Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
Q_IMPORT_PLUGIN(QComposePlatformInputContextPlugin) // Needed for dead keys on Linux
Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin)
Q_IMPORT_PLUGIN(QWaylandXdgShellIntegrationPlugin)
Q_IMPORT_PLUGIN(QWaylandBradientDecorationPlugin)
#endif
#if defined(Q_OS_MAC) && defined(STATIC)