When a .so library is added to the project using add_subdirectory, then it doesn't build for android because the RegEx used to convert the paths strip relative paths from the point of view of the build directory. for example, the lib will be "Qt-Color-Widgets/foo.so" will be converted to "/foo.so". diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake index 65e875b..b2fc83e 100644 --- a/toolchain/specifydependencies.cmake +++ b/toolchain/specifydependencies.cmake @@ -2,7 +2,7 @@ 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}") This patch remove the RegEx first group, as it seems useless and wrong. However if its there, I guess this it's no accident.
Adding CoLa, this was introduced in: commit c6ae4fa9008b0805f4358012040e67577ba31791 Author: Andreas Cord-Landwehr <cordlandwehr@kde.org> Date: Mon Jun 13 18:27:24 2016 +0200 Integrate relative library paths to APK Needed for many unit tests to add them to APK files. REVIEW: 128175
What do you propose to fix the issue? Here's a "test case" https://github.com/Elv13/test-crosscompile It is self contained, it will built its own version of the KF5 libraries, so (in theory), if you have both SDK and NDK environment variables set, it should compile and reproduce the problem
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!