From efa9998521cb061051fe8b75d0df3206d0b32ec5 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 12 Jun 2019 10:21:40 +0200 Subject: Fix compiling of examples on Android * Simplify add_qt_gui_executable() to not require WIN32/MACOSX_BUNDLE but provide it implicitly. It's redundant :) * When on Android, build a module (shared library), just like qmake. This requires an additional library destination in the install() call, but that's ignored on other platforms. * Fix typos in the android deployment generation settings function * Use the correct cache variable to determine whether we're inside a Qt build or not. Right now this only works inside Qt builds anyway as QtPlatformAndroid.cmake is not publically accessible. Change-Id: If1c763c31a7a83d0e0d854362ba7901657f63eb5 Reviewed-by: Alexandru Croitor Reviewed-by: Qt CMake Build Bot --- cmake/QtPlatformAndroid.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmake') diff --git a/cmake/QtPlatformAndroid.cmake b/cmake/QtPlatformAndroid.cmake index 8d0d8b67da..1d601e684b 100644 --- a/cmake/QtPlatformAndroid.cmake +++ b/cmake/QtPlatformAndroid.cmake @@ -17,8 +17,8 @@ # # Public functions: # -# qt_android_generate_depolyment_settings() -# Generate the depolyment settings json file for a cmake target. +# qt_android_generate_deployment_settings() +# Generate the deployment settings json file for a cmake target. # if (NOT DEFINED ANDROID_SDK_ROOT) @@ -133,7 +133,7 @@ define_property(TARGET ) # Generate deployment tool json -function(qt_android_generate_depolyment_settings target) +function(qt_android_generate_deployment_settings target) # Information extracted from mkspecs/features/android/android_deployment_settings.prf if (NOT TARGET ${target}) message(SEND_ERROR "${target} is not a cmake target") @@ -143,7 +143,7 @@ function(qt_android_generate_depolyment_settings target) get_target_property(target_type ${target} TYPE) if (NOT "${target_type}" STREQUAL "MODULE_LIBRARY") - message(SEND_ERROR "QT_ANDROID_GENERATE_DEPOLYMENT_SETTINGS only works on Module targets") + message(SEND_ERROR "QT_ANDROID_GENERATE_DEPLOYMENT_SETTINGS only works on Module targets") return() endif() @@ -161,10 +161,10 @@ function(qt_android_generate_depolyment_settings target) " \"description\": \"This file is generated by cmake to be read by androiddeployqt and should not be modified by hand.\",\n") # Host Qt Android install path - if (NOT QT_BUILD_QT) + if (NOT QT_BUILDING_QT) set(file_check "${Qt5_DIR}/plugins/platforms/android/libqtforandroid.so") if (NOT EXISTS ${file_check}) - message(SEND_ERROR "Detected Qt installation does not containt libqtforandroid.so. This is most likely due to the installation not being a build of Qt for Android. Please update your settings.") + message(SEND_ERROR "Detected Qt installation does not contain libqtforandroid.so. This is most likely due to the installation not being a build of Qt for Android. Please update your settings.") return() endif() set(qt_android_install_dir ${Qt5_Dir}) -- cgit v1.2.3