# XSD_LIBRARIES - The libraries needed to use libxsd
if(APPLE)
set(XSDCXX_DEFAULT_ROOT_PATH "/usr/local")
else()
set(XSDCXX_DEFAULT_ROOT_PATH "/usr")
endif()
set(XSDCXX_ROOT_PATH ${XSDCXX_DEFAULT_ROOT_PATH} CACHE STRING "Path of where the bin/xsdcxx executable will be found. Comes from http://www.codesynthesis.com/products/xsd/download.xhtml. On mac use 'brew install xsd'")
find_program(XSDCXX_PROG NAMES "xsdcxx""xsd"
HINTS ${XSDCXX_ROOT_PATH}/bin
)
if(XSDCXX_PROG)
set(XSD_FOUND 1)
message(STATUS "XSD found at ${XSDCXX_PROG}, enabling XSD")
# TODO: check XSD is the correct executable
find_library(XERCES_LIBS NAMES xerces-c)
if(NOT XERCES_LIBS)
message(FATAL_ERROR "Failed to find the Xerces library.")