diff options
author | l10n daemon script <scripty@kde.org> | 2015-11-08 21:01:33 +0000 |
---|---|---|
committer | l10n daemon script <scripty@kde.org> | 2015-11-08 21:01:33 +0000 |
commit | 7feccae76e01a65b406995b5ba9526fe9ade4299 (patch) | |
tree | 99011137f4dedcf4bf242e167ac7dc70d9136b8e /toolchain/specifydependencies.cmake | |
parent | a1bb0b0488843165e606771b75a3a67ba8a131a6 (diff) | |
parent | c88bc78e0ca3834c46b89ca9d14b404751da5d4a (diff) | |
download | extra-cmake-modules-5.16.0-rc2.tar.gz extra-cmake-modules-5.16.0-rc2.tar.bz2 |
Merge remote-tracking branch 'origin/master' into local_releasev5.16.0-rc2v5.16.0
Diffstat (limited to 'toolchain/specifydependencies.cmake')
-rw-r--r-- | toolchain/specifydependencies.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake new file mode 100644 index 00000000..21b169ae --- /dev/null +++ b/toolchain/specifydependencies.cmake @@ -0,0 +1,22 @@ +file(READ "${TARGET_DIR}/CMakeFiles/${TARGET_NAME}.dir/link.txt" out) + +string(FIND "${out}" "-o ${TARGET_NAME}" POS) #we trim the initial arguments, we want the ones in the end. we find the target +string(SUBSTRING "${out}" ${POS} -1 out) #we +string(REGEX MATCHALL " /.+\\.so" outout "${out}") +string(STRIP "${outout}" outout) +string(REPLACE " /" ";/" outout "${outout}") + +set(extralibs) +foreach(lib IN LISTS outout) #now we filter Qt5 libraries, because Qt wants to take care about these itself + if(NOT ${lib} MATCHES ".*/libQt5.*") + if(extralibs) + set(extralibs "${extralibs},${lib}") + else() + set(extralibs "${lib}") + endif() + endif() +endforeach() + +file(READ "${INPUT_FILE}" CONTENTS) +string(REPLACE "##EXTRALIBS##" "${extralibs}" NEWCONTENTS "${CONTENTS}") +file(WRITE "${OUTPUT_FILE}" ${NEWCONTENTS}) |