[Differential] [Request, 51 lines] D3646: Ignore host libs/includes/cmakeconfig files in Android toolchain

kossebau (Friedrich W. H. Kossebau) noreply at phabricator.kde.org
Sun Dec 11 21:52:42 UTC 2016


kossebau created this revision.
kossebau added reviewers: Frameworks, GCompris, Minuet, apol, cordlandwehr, mutlaqja, sandsmark, nienhueser.

REVISION SUMMARY
  Currently (since https://phabricator.kde.org/R240:123d0d14017a25fb387efd8fe3c2c1323f9c3815) any
  find_library() and find_path() calls look both at the host and the toolchain
  paths, which often results in includes and/or libraries wrongly being picked
  up from the host system, which then results in a failed build.
  CMake config files have always been also looked for on the host, which
  most often also is not wanted and resulting in a failed build.
  
  This patch fixes that by changing the mode for finding libraries,
  includes & packages to ONLY (again), as also recommended in the
  cmake-toolchains documentation.
  
  While before CMAKE_PREFIX_PATH was recommended to let cmake e.g.
  discover the Qt5 for Android libs, this patch wants a custom
  variable ECM_ANDROID_ROOT_PATH to be used instead.
  Reason is that CMAKE_PREFIX_PATH would be subject to the root
  handling, while here instead the root paths themselves are
  wanted.
  This patch does not add backward compatibility for still passing
  the Qt5 install prefix via CMAKE_PREFIX_PATH, as there are not
  that many users known yet and the old code did not work for many
  anyway, so the extra code hassle is not worth it. Instead the few
  build instructions would need to be updated (and should ask to use
  latest ECM in any case).
  
  Separate commit also untangles setting up paths & Co for
  includes, libraries, Qt, into own sections, for improved readability.
  
  And the bogus call
  
    set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM "${ANDROID_TOOLCHAIN_ROOT}")
  
  is removed.

TEST PLAN
  Building Marble now works without trying to use stuff from the
  host system.

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  avoidHostLibsIncludesinAndroidToolchain

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

AFFECTED FILES
  toolchain/Android.cmake

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kossebau, #frameworks, #gcompris, #minuet, apol, cordlandwehr, mutlaqja, sandsmark, nienhueser
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161211/a7a882b5/attachment.html>


More information about the Kde-frameworks-devel mailing list