summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2021-12-07 15:50:31 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-12-08 05:08:47 +0000
commitc876e3d5bf35e2ab2d982172366ba4e78ef7b84e (patch)
tree7a61bbee76b1df0e5066597a76c2afefec66f4a1
parent0885fb16dac9368bbec6fa46eee5cfa326420384 (diff)
downloadqtapplicationmanager-c876e3d5bf35e2ab2d982172366ba4e78ef7b84e.tar.gz
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 <robert.griebl@qt.io> (cherry picked from commit 6efaf00a1a367314d8a5e2a884dafbfca39cba50) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/main-lib/Qt6AppManMainPrivateMacros.cmake4
1 files 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 $<TARGET_FILE_NAME:${ARG_EXECUTABLE}> ${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}