[PATCH] D48459: Respect CMAKE_SYSROOT and CMAKE_CROSSCOMPILING when searching for libxml2.

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 25 17:29:41 PDT 2018


smeenai added a comment.

Okay, upon playing with this further, the following seems to do what I want (for a custom sysroot), and seems to be a pretty common pattern as well:

  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)


Repository:
  rC Clang

https://reviews.llvm.org/D48459





More information about the cfe-commits mailing list