summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-10-30 07:42:17 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-10-30 09:39:15 +0100
commitbf224b4c67841a5c2f4bb8a787b40566a871e09b (patch)
treea7c9265931e42dafa82b2e6660b840ff8f673d0d
parentf82517b510e7e700f7344844debb526d37cdbbb7 (diff)
Stop depending on private API in user-facing cmake code
The qt_parse_all_arguments() macro is not available as part of the public API, but it was used to generate code for extensions, which users need to be able to do. The result was that top-level builds would work because they could access the functions, but when our examples were built as stand-alone, it failed to find the function. The fix is just to copy-paste the contents of the macro. Fixes: QTBUG-87445 Fixes: QTBUG-87446 Change-Id: Id5a583358be4163d3cdab72d7c23804f66f45500 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--src/client/Qt6WaylandClientMacros.cmake6
-rw-r--r--src/compositor/Qt6WaylandCompositorMacros.cmake6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/client/Qt6WaylandClientMacros.cmake b/src/client/Qt6WaylandClientMacros.cmake
index 89430b242..408cf2379 100644
--- a/src/client/Qt6WaylandClientMacros.cmake
+++ b/src/client/Qt6WaylandClientMacros.cmake
@@ -1,5 +1,9 @@
function(qt6_generate_wayland_protocol_client_sources target)
- qt_parse_all_arguments(arg "qt6_generate_wayland_protocol_client_sources" "" "" "FILES" ${ARGN})
+ cmake_parse_arguments(arg "" "" "FILES" ${ARGN})
+ if(DEFINED arg_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown arguments were passed to qt6_generate_wayland_protocol_client_sources: (${arg_UNPARSED_ARGUMENTS}).")
+ endif()
+
get_target_property(target_binary_dir ${target} BINARY_DIR)
if(NOT TARGET Wayland::Scanner)
diff --git a/src/compositor/Qt6WaylandCompositorMacros.cmake b/src/compositor/Qt6WaylandCompositorMacros.cmake
index 4e25916d4..51edbb319 100644
--- a/src/compositor/Qt6WaylandCompositorMacros.cmake
+++ b/src/compositor/Qt6WaylandCompositorMacros.cmake
@@ -1,5 +1,9 @@
function(qt6_generate_wayland_protocol_server_sources target)
- qt_parse_all_arguments(arg "qt6_generate_wayland_protocol_server_sources" "" "" "FILES" ${ARGN})
+ cmake_parse_arguments(arg "" "" "FILES" ${ARGN})
+ if(DEFINED arg_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown arguments were passed to qt6_generate_wayland_protocol_server_sources: (${arg_UNPARSED_ARGUMENTS}).")
+ endif()
+
get_target_property(target_binary_dir ${target} BINARY_DIR)
if(NOT TARGET Wayland::Scanner)