Fix use in cross compilation
ClosedPublic

Authored by pwojcik on May 15 2019, 6:45 PM.

Details

Summary

This changes make kmag cross-compile with libqaccessibilityclient. Key difference is to make paths in generated QAccessibilityClient-release.cmake not fixed by using KDE_INSTALL_TARGETS_DEFAULT_ARGS. Lines reordering was needed because cmake skips recognizing compiler otherwise.
Patch is shaped after libkomparediff2's cmake file that works well.

Test Plan

Patch was used to cross build in Void Linux, kmag works.

Diff Detail

Repository
R578 Accessibilty Tools Helper Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
pwojcik requested review of this revision.May 15 2019, 6:45 PM
pwojcik created this revision.
kossebau accepted this revision.May 15 2019, 6:55 PM

Untested by me, but the changes all look sane to me (modulo the nitpicks I added). Feel free to fix and ship directly :)

CMakeLists.txt
12

this can be removed now that we have "​cmake_minimum_required(VERSION 3.0.0)"
besides, it would be too late here now that project() got moved up ;)

104

I would put this to the other includes, as if one adds stuff for the summary, like with set_package-properties,it needs to be available from the start. Also is the include usually grouped with the other ones.

105

This ideally should be next to find_package(ECM). Though IMHO these days it can be simply left out, as we also do not do this for KF5, and both are released now together anyway.

This revision is now accepted and ready to land.May 15 2019, 6:55 PM
pwojcik updated this revision to Diff 58160.May 16 2019, 9:47 AM

Updated. How do I ship? I am new to contributing kde and thought this is already a merge request.

Updated. How do I ship? I am new to contributing kde and thought this is already a merge request.

Phabricator does not support the concept of github-style merge requests, one has to still use git (or the commandline phabricator-helper tool "arc") to push reviewed code (BTW, gitlab system is currently under testing and might be used to replace phabricator, once last blockers are sorted out).

I assume you also do not yet have developer commit rights, so will push this fix for you (another BTW, once you did a few patches which are accepted, you would apply for a full KDE Developer account, so you can do more things yourself (https://community.kde.org/Infrastructure/Get_a_Developer_Account).
For that to do I would like to know which git commit author data I should use for you (name <email>)?

Please use "Piotr Wójcik <chocimier@tlen.pl>" as author.
Thanks and see you later!

This revision was automatically updated to reflect the committed changes.

@pwojcik Thanks for your patch. BTW, I did two follow-up commits to clean up more of the cmake code. Please test and tell is this still works for your setup as well.

Yes, still works well.

Yes, still works well.

Good, thanks for testing and confirming :)