Warning, /education/kstars/packaging/android/specifydependencies.cmake is written in an unsupported language. File is not indexed.
0001 file(READ "${TARGET_DIR}/CMakeFiles/${TARGET_NAME}.dir/link.txt" out) 0002 0003 0004 string(FIND "${out}" "-o lib${TARGET_NAME}.so" POS) #we trim the initial arguments, we want the ones in the end. we find the target 0005 if (${POS} EQUAL -1) 0006 string(FIND "${out}" "-o ../libs/armeabi-v7a/lib${TARGET_NAME}.so" POS) #we trim the initial arguments, we want the ones in the end. we find the target 0007 endif () 0008 string(SUBSTRING "${out}" ${POS} -1 out) #we 0009 string(REGEX MATCHALL "(/|\\.\\./|\\./)[^ ]+\\.so" outout "${out}") 0010 string(STRIP "${outout}" outout) 0011 string(REPLACE " /" ";/" outout "${outout}") 0012 0013 set(extralibs) 0014 foreach(lib IN LISTS outout) #now we filter Qt5 libraries, because Qt wants to take care about these itself 0015 if(NOT ${lib} MATCHES ".*/libQt5.*") 0016 # resolve relative paths 0017 if(${lib} MATCHES "^(\\.\\./|\\./)") 0018 set(lib "${TARGET_DIR}/${lib}") 0019 endif() 0020 if(extralibs) 0021 set(extralibs "${extralibs},${lib}") 0022 else() 0023 set(extralibs "${lib}") 0024 endif() 0025 endif() 0026 endforeach() 0027 if(extralibs) 0028 set(extralibs "\"android-extra-libs\": \"${extralibs}\",") 0029 endif() 0030 0031 set(extraplugins) 0032 foreach(folder "share" "lib/qml") #now we check for folders with extra stuff 0033 set(plugin "${EXPORT_DIR}/${folder}") 0034 if(EXISTS "${plugin}") 0035 if(extraplugins) 0036 set(extraplugins "${extraplugins},${plugin}") 0037 else() 0038 set(extraplugins "${plugin}") 0039 endif() 0040 endif() 0041 endforeach() 0042 if(extraplugins) 0043 set(extraplugins "\"android-extra-plugins\": \"${extraplugins}\",") 0044 endif() 0045 0046 file(READ "${INPUT_FILE}" CONTENTS) 0047 string(REPLACE "##EXTRALIBS##" "${extralibs}" NEWCONTENTS "${CONTENTS}") 0048 string(REPLACE "##EXTRAPLUGINS##" "${extraplugins}" NEWCONTENTS "${NEWCONTENTS}") 0049 file(WRITE "${OUTPUT_FILE}" ${NEWCONTENTS})