File: FindLibXML2.cmake

package info (click to toggle)
performous 1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,712 kB
  • ctags: 3,399
  • sloc: cpp: 16,764; ansic: 2,015; sh: 675; xml: 463; python: 355; makefile: 16
file content (30 lines) | stat: -rw-r--r-- 763 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# - Try to find LibXML2
# Once done, this will define
#
#  LibXML2_FOUND - system has LibXML2
#  LibXML2_INCLUDE_DIRS - the LibXML2 include directories
#  LibXML2_LIBRARIES - link these to use LibXML2
#
# See documentation on how to write CMake scripts at
# http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries

include(LibFindMacros)

libfind_pkg_check_modules(LibXML2_PKGCONF libxml-2.0)

find_path(LibXML2_INCLUDE_DIR
  NAMES libxml/xpath.h
  HINTS ${LibXML2_PKGCONF_INCLUDE_DIRS}
  HINTS ${LibXML2_PKGCONF_INCLUDE_DIRS}/libxml2
  PATH_SUFFIXES libxml2
)

find_library(LibXML2_LIBRARY
  NAMES xml2
  HINTS ${LibXML2_PKGCONF_LIBRARY_DIRS}
)

set(LibXML2_PROCESS_INCLUDES LibXML2_INCLUDE_DIR)
set(LibXML2_PROCESS_LIBS LibXML2_LIBRARY)
libfind_process(LibXML2)