D29096: Prefix includes and libs dir with QT_SYSROOT

Erik Schilling noreply at phabricator.kde.org
Thu Apr 23 12:35:34 BST 2020


ablu added a comment.


  > Not having done much cross-compilation-library-setups naively I would have thought that when building a library which uses ECMGeneratePriFile and preparing it for cross-compilation, the installation prefix would be hardcoded into the generated artifacts.. Seems that instead files are relocated sometimes, changing their path & prefix, or tools snipping of some things?
  
  There does not seem to be THE way to do it, gcc and alike have --sysroot for overriding the otherwise default of /usr/{include,lib}, cmake has variables which you can change to modify the path from which stuff is loaded, Qt itself uses variables like $$QT_MODULE_INCLUDE_BASE which is filled by MODULE_BASE_INDIR which is filled relative to a filename in the Qt install dir. I thought about using QT_MODULE_INCLUDE_BASE (and the lib alternative) first, but these are no public Qt API and could change any time. In contrast QT_SYSROOT is documented and should do the job I think.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D29096

To: ablu, #build_system, apol, vkrause, kfunk
Cc: kossebau, kde-frameworks-devel, kde-buildsystem, LeGast00n, cblack, bencreasy, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200423/96f759d7/attachment.html>


More information about the Kde-frameworks-devel mailing list