aboutsummaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-06-13 18:27:24 +0200
committerAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-06-15 15:40:34 +0200
commitc6ae4fa9008b0805f4358012040e67577ba31791 (patch)
tree5d89cbb134678cfacd758a4c9943aa97421049c6 /toolchain
parent2503481e4537b88d76b4a596f519cb3311e1ca2a (diff)
downloadextra-cmake-modules-c6ae4fa9008b0805f4358012040e67577ba31791.tar.gz
extra-cmake-modules-c6ae4fa9008b0805f4358012040e67577ba31791.tar.bz2
Integrate relative library paths to APKv5.24.0-rc1v5.24.0
Needed for many unit tests to add them to APK files. REVIEW: 128175
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/specifydependencies.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake
index e01c61a7..65e875bf 100644
--- a/toolchain/specifydependencies.cmake
+++ b/toolchain/specifydependencies.cmake
@@ -2,13 +2,17 @@ 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(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.*")
+ # resolve relative paths
+ if(${lib} MATCHES "^(\\.\\./|\\./)")
+ set(lib "${TARGET_DIR}/${lib}")
+ endif()
if(extralibs)
set(extralibs "${extralibs},${lib}")
else()