summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2021-09-16 18:13:25 +1000
committerCraig Scott <craig.scott@qt.io>2021-09-17 13:57:27 +1000
commitd47278fd09f73ddc34011ab980dafc23aa453e71 (patch)
tree0e42ca68c36129de39b88fafbc248fc9d588a32e /cmake
parenteda1276f80e39d519c88e7a491ff1d960c7a4dac (diff)
Ensure _qt_is_android_executable is set for internal executables too
The _qt_is_android_executable property is normally set by the _qt_internal_create_executable() command. But various other internal commands don't route through that and go through qt_internal_add_executable() instead. The former is used only by the public API, the latter only by the internal API. Refactor both so that the internal one calls the public one. This ensures all targets receive the same base settings, including the _qt_is_android_executable property. Fixes: QTBUG-96085 Pick-to: 6.2 Change-Id: I157356872c9d942d7be5f1abbbcbac97961b1f40 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtExecutableHelpers.cmake15
1 files changed, 2 insertions, 13 deletions
diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake
index 5e1f1ca28f..b5fb18de4b 100644
--- a/cmake/QtExecutableHelpers.cmake
+++ b/cmake/QtExecutableHelpers.cmake
@@ -19,13 +19,11 @@ function(qt_internal_add_executable name)
set(arg_INSTALL_DIRECTORY "${INSTALL_BINDIR}")
endif()
+ # TODO: EXE_FLAGS doesn't seem to be used anywhere, we can probably remove it
+ _qt_internal_create_executable(${name} ${arg_EXE_FLAGS})
if (ANDROID)
- add_library("${name}" MODULE)
- qt_android_apply_arch_suffix("${name}")
qt_android_generate_deployment_settings("${name}")
qt_android_add_apk_target("${name}")
- else()
- add_executable("${name}" ${arg_EXE_FLAGS})
endif()
if(arg_QT_APP AND QT_FEATURE_debug_and_release AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.19.0")
@@ -74,15 +72,6 @@ function(qt_internal_add_executable name)
endif()
qt_set_common_target_properties(${name})
- _qt_internal_set_up_static_runtime_library(${name})
- if(ANDROID)
- # On our qmake builds we don't compile the executables with
- # visibility=hidden. Not having this flag set will cause the
- # executable to have main() hidden and can then no longer be loaded
- # through dlopen()
- set_property(TARGET ${name} PROPERTY C_VISIBILITY_PRESET default)
- set_property(TARGET ${name} PROPERTY CXX_VISIBILITY_PRESET default)
- endif()
qt_autogen_tools_initial_setup(${name})
qt_skip_warnings_are_errors_when_repo_unclean("${name}")