Skip to content

Commit

Permalink
Add support for building QtWayland on macOS
Browse files Browse the repository at this point in the history
Change-Id: Ibed63a01abf32e10a31c610996ae93d3bd9ce153
Reviewed-by: Oswald Buddenhagen <[email protected]>
Reviewed-by: Paul Olav Tvete <[email protected]>
  • Loading branch information
Robert Griebl committed Jun 9, 2018
1 parent dbad7bd commit 427e5d6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
7 changes: 7 additions & 0 deletions mkspecs/common/mac.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_THREAD =

QMAKE_INCDIR_WAYLAND =
QMAKE_LIBS_WAYLAND_CLIENT = -lwayland-client
QMAKE_LIBS_WAYLAND_SERVER = -lwayland-server
QMAKE_LIBDIR_WAYLAND =
QMAKE_DEFINES_WAYLAND =
QMAKE_WAYLAND_SCANNER = wayland-scanner

QMAKE_ACTOOL = actool

QMAKE_DSYMUTIL = dsymutil
Expand Down
25 changes: 16 additions & 9 deletions mkspecs/features/wayland-scanner.prf
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,32 @@ defineReplace(waylandScannerHeaderFiles) {
return($$wayland_header_files_for_side)
}

qt_install_headers {
# 1) if we are a module, we need to create the headers in our private inc dir in qtbase
# 2) if also qt_install_headers is set, we need to generate INSTALLS rules in addition
# 3) if we are not a module, we just generate the headers in the current directory
!isEmpty(MODULE) {
header_dest = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private

header_files_client = $$waylandScannerHeaderFiles(client, $$header_dest)
!isEmpty(header_files_client) {
wayland_generated_client_headers.files = $$header_files_client
wayland_generated_client_headers.path = $$private_headers.path
wayland_generated_client_headers.CONFIG = no_check_exist
INSTALLS += wayland_generated_client_headers
qt_install_headers {
wayland_generated_client_headers.files = $$header_files_client
wayland_generated_client_headers.path = $$private_headers.path
wayland_generated_client_headers.CONFIG = no_check_exist
INSTALLS += wayland_generated_client_headers
}
WAYLAND_CLIENT_HEADER_DEST = $$header_dest/
WAYLAND_CLIENT_INCLUDE_DIR = $$MODULE_INCNAME/private
}

header_files_server = $$waylandScannerHeaderFiles(server, $$header_dest)
!isEmpty(header_files_server) {
wayland_generated_server_headers.files = $$header_files_server
wayland_generated_server_headers.path = $$private_headers.path
wayland_generated_server_headers.CONFIG = no_check_exist
INSTALLS += wayland_generated_server_headers
qt_install_headers {
wayland_generated_server_headers.files = $$header_files_server
wayland_generated_server_headers.path = $$private_headers.path
wayland_generated_server_headers.CONFIG = no_check_exist
INSTALLS += wayland_generated_server_headers
}
WAYLAND_SERVER_HEADER_DEST = $$header_dest/
WAYLAND_SERVER_INCLUDE_DIR = $$MODULE_INCNAME/private
}
Expand Down
2 changes: 1 addition & 1 deletion src/platformsupport/platformsupport.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid) {
input.depends += devicediscovery
}

if(unix:!darwin)|qtConfig(xcb): \
if(unix:!uikit)|qtConfig(xcb): \
SUBDIRS += services

qtConfig(opengl): \
Expand Down
2 changes: 1 addition & 1 deletion src/platformsupport/themes/themes.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CONFIG += static internal_module

DEFINES += QT_NO_CAST_FROM_ASCII

if(unix:!darwin)|qtConfig(xcb): \
if(unix:!uikit)|qtConfig(xcb): \
include($$PWD/genericunix/genericunix.pri)

HEADERS += \
Expand Down

0 comments on commit 427e5d6

Please sign in to comment.