2016-10-12 18:04 GMT+02:00 Konstantin Tokarev <annu...@yandex.ru>:

> 12.10.2016, 18:48, "Eric Noulard" <eric.noul...@gmail.com>:
> > 2016-10-12 17:28 GMT+02:00 Konstantin Tokarev <annu...@yandex.ru>:
> >
> > My guess is that your find_package call end up in "Module mode"  because
> there is a FindLibXml2.cmake module bundled with cmake does not honor all
> options of the find_package when in this mode.
> >
> > So I bet FindLibXml2.cmake does not handle the given
> > "PATHS "/usr" NO_DEFAULT_PATH" part.
> >
> > Which are handled by find_package when running in "Config mode".
> >
> > I suggest you to try patch and update the FindLibXml2.cmake module.
> Could anyone point me to module example that handles NO_DEFAULT_PATH
> correctly?

Wait for other answers but from my understanding the "Module" mode does not
handle such find_package parameter.

> > Or simply craft your own
> >
> > find_library(...) call.if you only need the libxml2.
> That's not an elegant solution as I need to find include dir as well, and
> also do the same for libxslt which is in the same boat.

I see.
Then provided that module mode does not handle the "NO_DEFAULT_PATH" you
may need to do something similar to whats is done
by the FindZLIB.cmake module:

# A user may set ``ZLIB_ROOT`` to a zlib installation root to tell this
# module where to look.


# Search ZLIB_ROOT first if it is set.


Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 

Follow this link to subscribe/unsubscribe:

Reply via email to