duckscraper/cmake/Modules/FindXQilla.cmake
King_DuckZ 430886085c Use XQilla and Xerces-c from the system instead of pugixml.
I don't think this commit works or even compiles, I have too many
changes and I have to start committing from somewhere. At the same
time I don't want to make a "lots of changes here and there" kind
of commit.
2020-02-18 10:19:51 +01:00

28 lines
806 B
CMake

# Find the XQilla library
# originally taken from
# https://github.com/rug-compling/alpinocorpus/blob/master/cmake/FindXQilla.cmake
find_path(XQILLA_INCLUDE_DIR NAMES xqilla/xqilla-simple.hpp)
find_library(XQILLA_LIBRARY NAMES xqilla)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
XQILLA
DEFAULT_MSG
XQILLA_INCLUDE_DIR
XQILLA_LIBRARY
)
set(XQILLA_LIBRARIES ${XQILLA_LIBRARY})
mark_as_advanced(XQILLA_INCLUDE_DIR XQILLA_LIBRARY)
if (XQILLA_FOUND)
find_package(XercesC REQUIRED)
if (NOT TARGET XQilla::XQilla)
add_library(XQilla::XQilla UNKNOWN IMPORTED)
set_target_properties(XQilla::XQilla PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${XQILLA_INCLUDE_DIR}"
IMPORTED_LOCATION "${XQILLA_LIBRARY}"
INTERFACE_LINK_LIBRARIES XercesC::XercesC
)
endif()
endif()