summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt6CoreMacros.cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2020-11-30 17:16:41 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-01 18:43:31 +0000
commitb5ecdce605685996a5e280edd164f8853f8326df (patch)
treeb6ff3c03e72df56e21a2ae322e3145fd6e7da836 /src/corelib/Qt6CoreMacros.cmake
parent3356881860608325d36f6afb1f551691fb38fe35 (diff)
CMake: Allow WIN32 and MACOSX_BUNDLE arguments for qt6_add_executable
qt6_add_executable will forward all arguments to add_executable, which works fine on Windows and macOS in regards of WIN32 and MACOSX_BUNDLE arguments. On Android however add_library is being used, and those arguments need to be removed otherwise they will be consided as source files. Fixes: QTBUG-88926 Change-Id: Id22fdf91d58d9053eaad2d3c080ea72060d928c0 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7b5fd05e8bdfe90af689541b0379289eb54b4079) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/Qt6CoreMacros.cmake')
-rw-r--r--src/corelib/Qt6CoreMacros.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake
index f310f74584..bb1deffd04 100644
--- a/src/corelib/Qt6CoreMacros.cmake
+++ b/src/corelib/Qt6CoreMacros.cmake
@@ -430,6 +430,7 @@ set(_Qt6_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
# Wrapper function that adds an executable with some Qt specific behavior.
function(qt6_add_executable target)
if(ANDROID)
+ list(REMOVE_ITEM ARGN "WIN32" "MACOSX_BUNDLE")
add_library("${target}" MODULE ${ARGN})
# On our qmake builds we do don't compile the executables with
# visibility=hidden. Not having this flag set will cause the