wayland-scanner.prf: Remove special-casing for generated headers
Generated headers can now be installed using inject_headers and private_headers instead. Change-Id: I51d98e2e05d12aa9f6ab09f8ccb12b81a0c0cd6f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
6934be03fe
commit
a7730793be
@ -14,61 +14,10 @@
|
|||||||
|
|
||||||
isEmpty(QMAKE_WAYLAND_SCANNER):error("QMAKE_WAYLAND_SCANNER not defined for this mkspec")
|
isEmpty(QMAKE_WAYLAND_SCANNER):error("QMAKE_WAYLAND_SCANNER not defined for this mkspec")
|
||||||
|
|
||||||
defineReplace(waylandScannerHeaderFiles) {
|
|
||||||
side = $$1
|
|
||||||
path = $$2
|
|
||||||
isEqual(side, "server"): \
|
|
||||||
sources_list = $$WAYLANDSERVERSOURCES $$WAYLANDSERVERSOURCES_SYSTEM
|
|
||||||
else: \
|
|
||||||
sources_list = $$WAYLANDCLIENTSOURCES $$WAYLANDCLIENTSOURCES_SYSTEM
|
|
||||||
wayland_header_files_for_side =
|
|
||||||
for(file, sources_list) {
|
|
||||||
basenameFile = $$basename(file)
|
|
||||||
basenameFile ~= s,\\.xml$,,
|
|
||||||
wayland_header_files_for_side += $$path/wayland-$$basenameFile-$$side-protocol$${first(QMAKE_EXT_H)}
|
|
||||||
isEqual(side, "server"): \
|
|
||||||
wayland_header_files_for_side += $$path/qwayland-server-$$basenameFile$${first(QMAKE_EXT_H)}
|
|
||||||
else: \
|
|
||||||
wayland_header_files_for_side += $$path/qwayland-$$basenameFile$${first(QMAKE_EXT_H)}
|
|
||||||
}
|
|
||||||
return($$wayland_header_files_for_side)
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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) {
|
|
||||||
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) {
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wayland_server_header.name = wayland ${QMAKE_FILE_BASE}
|
wayland_server_header.name = wayland ${QMAKE_FILE_BASE}
|
||||||
wayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
|
wayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
|
||||||
wayland_server_header.variable_out = HEADERS
|
wayland_server_header.variable_out = HEADERS
|
||||||
wayland_server_header.output = $${WAYLAND_SERVER_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
|
wayland_server_header.output = wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
|
||||||
wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
|
wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
|
||||||
silent:wayland_server_header.commands = @echo Wayland server header ${QMAKE_FILE_IN} && $$wayland_server_header.commands
|
silent:wayland_server_header.commands = @echo Wayland server header ${QMAKE_FILE_IN} && $$wayland_server_header.commands
|
||||||
QMAKE_EXTRA_COMPILERS += wayland_server_header
|
QMAKE_EXTRA_COMPILERS += wayland_server_header
|
||||||
@ -76,7 +25,7 @@ QMAKE_EXTRA_COMPILERS += wayland_server_header
|
|||||||
wayland_client_header.name = wayland ${QMAKE_FILE_BASE}
|
wayland_client_header.name = wayland ${QMAKE_FILE_BASE}
|
||||||
wayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
|
wayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
|
||||||
wayland_client_header.variable_out = HEADERS
|
wayland_client_header.variable_out = HEADERS
|
||||||
wayland_client_header.output = $${WAYLAND_CLIENT_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
|
wayland_client_header.output = wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
|
||||||
wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
|
wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
|
||||||
silent:wayland_client_header.commands = @echo Wayland client header ${QMAKE_FILE_IN} && $$wayland_client_header.commands
|
silent:wayland_client_header.commands = @echo Wayland client header ${QMAKE_FILE_IN} && $$wayland_client_header.commands
|
||||||
QMAKE_EXTRA_COMPILERS += wayland_client_header
|
QMAKE_EXTRA_COMPILERS += wayland_client_header
|
||||||
@ -94,35 +43,35 @@ qtPrepareTool(QMAKE_QTWAYLANDSCANNER, qtwaylandscanner)
|
|||||||
qtwayland_client_header.name = qtwayland ${QMAKE_FILE_BASE}
|
qtwayland_client_header.name = qtwayland ${QMAKE_FILE_BASE}
|
||||||
qtwayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
|
qtwayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
|
||||||
qtwayland_client_header.variable_out = HEADERS
|
qtwayland_client_header.variable_out = HEADERS
|
||||||
qtwayland_client_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
|
qtwayland_client_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
|
||||||
qtwayland_client_header.output = $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
qtwayland_client_header.output = qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||||
qtwayland_client_header.commands = $$QMAKE_QTWAYLANDSCANNER client-header ${QMAKE_FILE_IN} $$WAYLAND_CLIENT_INCLUDE_DIR > ${QMAKE_FILE_OUT}
|
qtwayland_client_header.commands = $$QMAKE_QTWAYLANDSCANNER client-header ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
|
||||||
silent:qtwayland_client_header.commands = @echo QtWayland client header ${QMAKE_FILE_IN} && $$qtwayland_client_header.commands
|
silent:qtwayland_client_header.commands = @echo QtWayland client header ${QMAKE_FILE_IN} && $$qtwayland_client_header.commands
|
||||||
QMAKE_EXTRA_COMPILERS += qtwayland_client_header
|
QMAKE_EXTRA_COMPILERS += qtwayland_client_header
|
||||||
|
|
||||||
qtwayland_client_code.name = qtwayland ${QMAKE_FILE_BASE}
|
qtwayland_client_code.name = qtwayland ${QMAKE_FILE_BASE}
|
||||||
qtwayland_client_code.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
|
qtwayland_client_code.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
|
||||||
qtwayland_client_code.variable_out = SOURCES
|
qtwayland_client_code.variable_out = SOURCES
|
||||||
qtwayland_client_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
qtwayland_client_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||||
qtwayland_client_code.output = qwayland-${QMAKE_FILE_BASE}.cpp
|
qtwayland_client_code.output = qwayland-${QMAKE_FILE_BASE}.cpp
|
||||||
qtwayland_client_code.commands = $$QMAKE_QTWAYLANDSCANNER client-code ${QMAKE_FILE_IN} $$WAYLAND_CLIENT_INCLUDE_DIR > ${QMAKE_FILE_OUT}
|
qtwayland_client_code.commands = $$QMAKE_QTWAYLANDSCANNER client-code ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
|
||||||
silent:qtwayland_client_code.commands = @echo QtWayland client code ${QMAKE_FILE_IN} && $$qtwayland_client_code.commands
|
silent:qtwayland_client_code.commands = @echo QtWayland client code ${QMAKE_FILE_IN} && $$qtwayland_client_code.commands
|
||||||
QMAKE_EXTRA_COMPILERS += qtwayland_client_code
|
QMAKE_EXTRA_COMPILERS += qtwayland_client_code
|
||||||
|
|
||||||
qtwayland_server_header.name = qtwayland ${QMAKE_FILE_BASE}
|
qtwayland_server_header.name = qtwayland ${QMAKE_FILE_BASE}
|
||||||
qtwayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
|
qtwayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
|
||||||
qtwayland_server_header.variable_out = HEADERS
|
qtwayland_server_header.variable_out = HEADERS
|
||||||
qtwayland_server_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
|
qtwayland_server_header.depends += $$QMAKE_QTWAYLANDSCANNER_EXE wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
|
||||||
qtwayland_server_header.output = $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
qtwayland_server_header.output = qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||||
qtwayland_server_header.commands = $$QMAKE_QTWAYLANDSCANNER server-header ${QMAKE_FILE_IN} $$WAYLAND_SERVER_INCLUDE_DIR > ${QMAKE_FILE_OUT}
|
qtwayland_server_header.commands = $$QMAKE_QTWAYLANDSCANNER server-header ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
|
||||||
silent:qtwayland_server_header.commands = @echo QtWayland server header ${QMAKE_FILE_IN} && $$qtwayland_server_header.commands
|
silent:qtwayland_server_header.commands = @echo QtWayland server header ${QMAKE_FILE_IN} && $$qtwayland_server_header.commands
|
||||||
QMAKE_EXTRA_COMPILERS += qtwayland_server_header
|
QMAKE_EXTRA_COMPILERS += qtwayland_server_header
|
||||||
|
|
||||||
qtwayland_server_code.name = qtwayland ${QMAKE_FILE_BASE}
|
qtwayland_server_code.name = qtwayland ${QMAKE_FILE_BASE}
|
||||||
qtwayland_server_code.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
|
qtwayland_server_code.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
|
||||||
qtwayland_server_code.variable_out = SOURCES
|
qtwayland_server_code.variable_out = SOURCES
|
||||||
qtwayland_server_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
qtwayland_server_code.depends += $$QMAKE_QTWAYLANDSCANNER_EXE qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
|
||||||
qtwayland_server_code.output = qwayland-server-${QMAKE_FILE_BASE}.cpp
|
qtwayland_server_code.output = qwayland-server-${QMAKE_FILE_BASE}.cpp
|
||||||
qtwayland_server_code.commands = $$QMAKE_QTWAYLANDSCANNER server-code ${QMAKE_FILE_IN} $$WAYLAND_SERVER_INCLUDE_DIR > ${QMAKE_FILE_OUT}
|
qtwayland_server_code.commands = $$QMAKE_QTWAYLANDSCANNER server-code ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
|
||||||
silent:qtwayland_server_code.commands = @echo QtWayland server code ${QMAKE_FILE_IN} && $$qtwayland_server_code.commands
|
silent:qtwayland_server_code.commands = @echo QtWayland server code ${QMAKE_FILE_IN} && $$qtwayland_server_code.commands
|
||||||
QMAKE_EXTRA_COMPILERS += qtwayland_server_code
|
QMAKE_EXTRA_COMPILERS += qtwayland_server_code
|
||||||
|
Loading…
Reference in New Issue
Block a user