Newer
Older
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# - Find Xerces-C
# This module tries to find the Xerces-C library and headers.
# Once done this will define
#
# XERCESC_FOUND - system has Xerces-C headers and libraries
# XERCESC_INCLUDE_DIRS - the include directories needed for Xerces-C
# XERCESC_LIBRARIES - the libraries needed to use Xerces-C
#
# Variables used by this module, which can change the default behaviour and
# need to be set before calling find_package:
#
# XERCESC_ROOT_DIR Root directory to Xerces-C installation. Will
# be used ahead of CMake default path.
#
# The following advanced variables may be used if the module has difficulty
# locating Xerces-C or you need fine control over what is used.
#
# XERCESC_INCLUDE_DIR
#
# XERCESC_LIBRARY
#
# Copyright (c) 2009, Ben Morgan, <Ben.Morgan@warwick.ac.uk>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Look for the header - preferentially searching below XERCESC_ROOT_DIR
find_path(
XERCESC_INCLUDE_DIR
NAMES xercesc/util/XercesVersion.hpp
PATHS ${XERCESC_ROOT_DIR}
PATH_SUFFIXES include
NO_DEFAULT_PATH
)
# If we didn't find it there, fall back to some standard search paths
find_path(
XERCESC_INCLUDE_DIR
NAMES xercesc/util/XercesVersion.hpp
)
# Look for the library, preferentially searching below XERCESC_ROOT_DIR
find_library(
XERCESC_LIBRARY
NAMES xerces-c xerces-c_3
PATHS ${XERCESC_ROOT_DIR}
PATH_SUFFIXES lib64 lib32 lib
NO_DEFAULT_PATH
)
find_library(
XERCESC_LIBRARY
NAMES xerces-c xerces-c_3
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
XercesC
DEFAULT_MSG
XERCESC_LIBRARY
XERCESC_INCLUDE_DIR
)
if (XERCESC_FOUND)
set(XERCESC_LIBRARIES ${XERCESC_LIBRARY})
set(XERCESC_INCLUDE_DIRS ${XERCESC_INCLUDE_DIR})
else (XERCESC_FOUND)
set(XERCESC_LIBRARIES)
set(XERCESC_INCLUDE_DIRS)
endif (XERCESC_FOUND)
mark_as_advanced(
XERCESC_LIBRARY
XERCESC_INCLUDE_DIR
)