File: FindLibXML.cmake

package info (click to toggle)
libical3 3.0.20-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,068 kB
  • sloc: ansic: 37,740; xml: 6,726; cpp: 6,414; python: 2,551; perl: 1,613; java: 1,415; yacc: 1,136; sh: 520; lex: 133; makefile: 46; php: 10
file content (27 lines) | stat: -rw-r--r-- 645 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
# - try to find libxml
#
# Once done this will define
#
#  LIBXML_FOUND - system has libxml 2.0
#  LIBXML_CFLAGS
#  LIBXML_LIBRARIES

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
  set(_libxml_version_cmp)
  if(DEFINED LibXML_FIND_VERSION)
    set(_libxml_version_cmp ${LibXML_FIND_VERSION})
    set(_libxml_version_cmp ">=${_libxml_version_cmp}")
  endif()
  pkg_check_modules(_pc_libxml libxml-2.0${_libxml_version_cmp})
  if(_pc_libxml_FOUND)
    set(LIBXML_FOUND TRUE)
    set(LIBXML_CFLAGS "${_pc_libxml_CFLAGS}")
    set(LIBXML_LIBRARIES "${_pc_libxml_LIBRARIES}")
  endif()
endif()

mark_as_advanced(
  LIBXML_CFLAGS
  LIBXML_LIBRARIES
)