From d3feb0a9821cd0f2d2a87e6717a2710613d0ecf3 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 17 Mar 2017 17:17:22 +0100 Subject: Improve error messages --- toolchain/Android.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'toolchain/Android.cmake') diff --git a/toolchain/Android.cmake b/toolchain/Android.cmake index 9600e655..3314abf9 100644 --- a/toolchain/Android.cmake +++ b/toolchain/Android.cmake @@ -225,8 +225,10 @@ set(CREATEAPK_TARGET_NAME "create-apk-${QTANDROID_EXPORTED_TARGET}") # from CMakeDetermineSystem.cmake and from CMakeSystem.cmake generated within the # build directory. if(DEFINED QTANDROID_EXPORTED_TARGET AND NOT TARGET ${CREATEAPK_TARGET_NAME}) - if(NOT EXISTS "${ANDROID_APK_DIR}/AndroidManifest.xml") + if(NOT DEFINED ANDROID_APK_DIR) message(FATAL_ERROR "Define an apk dir to initialize from using -DANDROID_APK_DIR=. The specified directory must contain the AndroidManifest.xml file.") + elseif(NOT EXISTS "${ANDROID_APK_DIR}/AndroidManifest.xml") + message(FATAL_ERROR "Cannot find ${ANDROID_APK_DIR}/AndroidManifest.xml according to ANDROID_APK_DIR") endif() find_package(Qt5Core REQUIRED) -- cgit v1.2.1