From bd7aa7a91ab75639ddc3a274718da55e6cd2ae81 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 9 Feb 2015 12:44:29 +0100 Subject: Add comment to Android toolchain file. --- toolchain/Android.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'toolchain/Android.cmake') diff --git a/toolchain/Android.cmake b/toolchain/Android.cmake index 55d2ca81..0144f379 100644 --- a/toolchain/Android.cmake +++ b/toolchain/Android.cmake @@ -161,6 +161,9 @@ set(CMAKE_CXX_LINK_EXECUTABLE ######### generation set(CREATEAPK_TARGET_NAME "create-apk-${QTANDROID_EXPORTED_TARGET}") +# Need to ensure we only get in here once, as this file is included twice: +# 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") message(FATAL_ERROR "Define an apk dir to initialize from using -DANDROID_APK_DIR=. The specified directory must contain the AndroidManifest.xml file.") @@ -184,6 +187,8 @@ if(DEFINED QTANDROID_EXPORTED_TARGET AND NOT TARGET ${CREATEAPK_TARGET_NAME}) string(REPLACE ";" "," _DEPS "${_DEPS_LIST}") configure_file("${_CMAKE_ANDROID_DIR}/deployment-file.json.in" "${QTANDROID_EXPORTED_TARGET}-deployment.json") endfunction() + #we want to call the function after the project has been set up + variable_watch(CMAKE_PARENT_LIST_FILE EOFHook) # Create the target that will eventually generate the apk get_filename_component(QTDIR "${Qt5Core_DIR}/../../../" ABSOLUTE) @@ -197,9 +202,6 @@ if(DEFINED QTANDROID_EXPORTED_TARGET AND NOT TARGET ${CREATEAPK_TARGET_NAME}) COMMAND cmake -E copy "$" "${EXECUTABLE_DESTINATION_PATH}" COMMAND ${ANDROID_DEPLOY_QT} --input "${QTANDROID_EXPORTED_TARGET}-deployment.json" --output "${EXPORT_DIR}" --deployment bundled "\\$(ARGS)" ) - - #we want to call the function after the project has been set up - variable_watch(CMAKE_PARENT_LIST_FILE EOFHook) else() message(STATUS "You can export a target by specifying -DQTANDROID_EXPORTED_TARGET=") endif() -- cgit v1.2.1