aboutsummaryrefslogtreecommitdiff
path: root/toolchain/specifydependencies.cmake
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-05-03 17:00:24 +0200
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-05-03 17:00:24 +0200
commite0cfec7848ba63190957e107c7ef32dbe0119c42 (patch)
treebbe700543d38547fbe427cf56deed6867e508be8 /toolchain/specifydependencies.cmake
parentd914de956197c72e4df55b7b09ebae1222c5ddcf (diff)
downloadextra-cmake-modules-e0cfec7848ba63190957e107c7ef32dbe0119c42.tar.gz
extra-cmake-modules-e0cfec7848ba63190957e107c7ef32dbe0119c42.tar.bz2
Android deployment: support projects without things in share or lib/qmlv5.22.0-rc1v5.22.0
Just setting the field android-extra-plugins to an empty string resulted in androiddeployqt complaining about "External resource does not exist or not a correct directory!" so the field is completely left out now if no plugin data dirs are found. For consistency the same is done with the android-extra-libs field. REVIEW: 127700 BUG: 362578 Thanks apol for review
Diffstat (limited to 'toolchain/specifydependencies.cmake')
-rw-r--r--toolchain/specifydependencies.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake
index 21b169ae..e01c61a7 100644
--- a/toolchain/specifydependencies.cmake
+++ b/toolchain/specifydependencies.cmake
@@ -16,7 +16,26 @@ foreach(lib IN LISTS outout) #now we filter Qt5 libraries, because Qt wants to t
endif()
endif()
endforeach()
+if(extralibs)
+ set(extralibs "\"android-extra-libs\": \"${extralibs}\",")
+endif()
+
+set(extraplugins)
+foreach(folder "share" "lib/qml") #now we check for folders with extra stuff
+ set(plugin "${EXPORT_DIR}/${folder}")
+ if(EXISTS "${plugin}")
+ if(extraplugins)
+ set(extraplugins "${extraplugins},${plugin}")
+ else()
+ set(extraplugins "${plugin}")
+ endif()
+ endif()
+endforeach()
+if(extraplugins)
+ set(extraplugins "\"android-extra-plugins\": \"${extraplugins}\",")
+endif()
file(READ "${INPUT_FILE}" CONTENTS)
string(REPLACE "##EXTRALIBS##" "${extralibs}" NEWCONTENTS "${CONTENTS}")
+string(REPLACE "##EXTRAPLUGINS##" "${extraplugins}" NEWCONTENTS "${NEWCONTENTS}")
file(WRITE "${OUTPUT_FILE}" ${NEWCONTENTS})