FindLibXml2 finds local library when cross compiling

I finally found, that FindLibXml2.cmake invokes PKG_CHECK_MODULES(PC_LIBXML QUIET libxml-2.0), which does not seem to find libxml and than invokes find_path(), passing the directories obtained from PKG_CHECK_MODULES():

find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
   HINTS
   ${PC_LIBXML_INCLUDEDIR}
   ${PC_LIBXML_INCLUDE_DIRS}
   PATH_SUFFIXES libxml2
   )
${PC_LIBXML_INCLUDEDIR} = ""
${PC_LIBXML_INCLUDE_DIRS} = ""

and find_path() returns LIBXML2_INCLUDE_DIR=“/usr/include/libxml2”. The documentation of find_path() lists a lots of CMake and environment variables, which are used. Setting CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH to false looks promising, but cmake doesn’t even find make anymore, when I use this setting.

It then calls find_library():

find_library(LIBXML2_LIBRARY NAMES xml2 libxml2 libxml2_a
   HINTS
   ${PC_LIBXML_LIBDIR}
   ${PC_LIBXML_LIBRARY_DIRS}
   )
${PC_LIBXML_LIBDIR} = ""
${PC_LIBXML_LIBRARY_DIRS} = ""

which returns LIBXML2_LIBRARY=“/usr/lib/libxml2.so”.