File: FindLibXML%2B%2B.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 (39 lines) | stat: -rw-r--r-- 1,037 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
# - Try to find LibXML++ 2.6
# Once done, this will define
#
#  LibXML++_FOUND - system has LibXML++
#  LibXML++_INCLUDE_DIRS - the LibXML++ include directories
#  LibXML++_LIBRARIES - link these to use LibXML++

include(LibFindMacros)

# Dependencies
libfind_package(LibXML++ LibXML2)
libfind_package(LibXML++ Glibmm)

# Use pkg-config to get hints about paths
libfind_pkg_check_modules(LibXML++_PKGCONF libxml++-2.6)

# Main include dir
find_path(LibXML++_INCLUDE_DIR
  NAMES libxml++/libxml++.h
  HINTS ${LibXML++_PKGCONF_INCLUDE_DIRS}
  PATH_SUFFIXES libxml++-2.6
)

# Glib-related libraries also use a separate config header, which is in lib dir
find_path(LibXML++Config_INCLUDE_DIR
  NAMES libxml++config.h
  HINTS ${LibXML++_PKGCONF_INCLUDE_DIRS} /usr
  PATH_SUFFIXES lib/libxml++-2.6/include ../lib/libxml++-2.6/include
)

# Finally the library itself
find_library(LibXML++_LIBRARY
  NAMES xml++-2.6
  HINTS ${LibXML++_PKGCONF_LIBRARY_DIRS}
)

set(LibXML++_PROCESS_INCLUDES LibXML++Config_INCLUDE_DIR)
libfind_process(LibXML++)