From 9630f521c1646ad205061daf790bfa3a6e6fe2b8 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Tue, 7 Dec 2021 15:50:31 +0100 Subject: Rename main.cpp generated by qt6_am_add_systemui_wrapper in cmake examples This is needed as our doc build will otherwise pick up the generated main.cpp as an important source file for the examples-manifest.xml But because the referenced main.cpp doesn't exist in the source tree QtCreator will complain when opening such an example. Renaming the file to wrapper.cpp fixes it as qdoc doesn't pick that up. Fixes: QTBUG-98797 Change-Id: Id6b20ae7c113b2bb8dd38fb9e4f8c5ddcb44f4f2 Reviewed-by: Robert Griebl (cherry picked from commit 6efaf00a1a367314d8a5e2a884dafbfca39cba50) Reviewed-by: Qt Cherry-pick Bot --- src/main-lib/Qt6AppManMainPrivateMacros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main-lib/Qt6AppManMainPrivateMacros.cmake b/src/main-lib/Qt6AppManMainPrivateMacros.cmake index 8e92f89e..4e82e53b 100644 --- a/src/main-lib/Qt6AppManMainPrivateMacros.cmake +++ b/src/main-lib/Qt6AppManMainPrivateMacros.cmake @@ -61,7 +61,7 @@ function(qt6_am_add_systemui_wrapper target) string(JOIN " " CMD_ARGS_STR ${CMD_ARGS}) string(JOIN " " CMD_EXTRA_ARGS_STR ${ARG_EXTRA_ARGS}) - configure_file(${_AM_MACROS_LOCATION}/wrapper.cpp.in main.cpp) + configure_file(${_AM_MACROS_LOCATION}/wrapper.cpp.in wrapper.cpp) if (COMMAND qt_internal_collect_command_environment) qt_internal_collect_command_environment(test_env_path test_env_plugin_path) @@ -97,7 +97,7 @@ exec $ ${CMD_ARGS_STR} ${CMD_EXTRA_ARGS_STR} add_executable(${target} - ${CMAKE_CURRENT_BINARY_DIR}/main.cpp + ${CMAKE_CURRENT_BINARY_DIR}/wrapper.cpp # Add all files we copy to the build folder as sources to the main executable # This makes all files show up in the IDE ${ALL_EXTRA_FILES} -- cgit v1.2.3