Commit d5d9ee8c authored by Ghislain MARY's avatar Ghislain MARY

Fix search of libxml2 on Mac OS X.

parent b4915735
......@@ -26,13 +26,16 @@
# XML2_INCLUDE_DIRS - the libxml2 include directory
# XML2_LIBRARIES - The libraries needed to use libxml2
if(APPLE AND IOS)
set(_XML2_ROOT_PATHS "/usr/lib")
if(APPLE AND NOT IOS)
set(XML2_HINTS "/usr")
endif()
if(XML2_HINTS)
set(XML2_LIBRARIES_HINTS "${XML2_HINTS}/lib")
endif()
find_path(XML2_INCLUDE_DIRS
NAMES libxml/xmlreader.h
HINTS "${_XML2_ROOT_PATHS}"
HINTS "${XML2_HINTS}"
PATH_SUFFIXES include/libxml2
)
......@@ -42,7 +45,7 @@ endif()
find_library(XML2_LIBRARIES
NAMES xml2
HINTS "${_XML2_ROOT_PATHS}"
HINTS "${XML2_LIBRARIES_HINTS}"
)
include(FindPackageHandleStandardArgs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment