-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathFindXercesC.cmake
64 lines (58 loc) · 2.16 KB
/
FindXercesC.cmake
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
# Finds the xerces-c library
# Copyright © 2005-2009 Swiss Tropical Institute and Liverpool School Of Tropical Medicine
# Licence: GNU General Public Licence version 2 or later (see COPYING)
#
# Defines:
# XERCESC_LIBRARIES
FIND_PATH(XERCESC_INCLUDE_DIRS xercesc/dom/DOMNode.hpp
PATHS "[HKEY_CURRENT_USER\\software\\xsd\\include]"
"[HKEY_CURRENT_USER]\\xsd\\include]"
$ENV{XSDDIR}/include
/usr/local/include
/usr/include
"C:/Program Files/CodeSynthesis XSD 3.2/include"
"D:/Program Files/CodeSynthesis XSD 3.2/include"
"C:/Program Files/CodeSynthesis XSD 3.3/include"
"C:/Program Files/CodeSynthesis XSD 4.0/include"
"C:/Program Files (x86)/CodeSynthesis XSD 3.3/include"
"C:/Program Files (x86)/CodeSynthesis XSD 4.0/include"
${CMAKE_SOURCE_DIR}/../xsd/libxsd
)
set (XERCESC_LIB_PATHS
PATHS ${CMAKE_SOURCE_DIR}/lib
${XERCESC_INCLUDE_DIRS}/../lib
"C:/Program Files/CodeSynthesis XSD 3.2/lib/vc-8.0"
"D:/Program Files/CodeSynthesis XSD 3.2/lib/vc-8.0"
"C:/Program Files/CodeSynthesis XSD 3.3/lib/vc-8.0"
"C:/Program Files/CodeSynthesis XSD 4.0/lib64/vc-12.0"
"C:/Program Files (x86)/CodeSynthesis XSD 3.3/lib/vc-8.0"
"C:/Program Files (x86)/CodeSynthesis XSD 4.0/lib/vc-12.0"
)
find_library (XERCESC_LIB_OPT NAMES xerces-c xerces-c_3 xerces-c_2 xerces-c_static xerces-c_static_3 xerces-c_static_2
${XERCESC_LIB_PATHS}
)
find_library (XERCESC_LIB_DBG NAMES xerces-c_D xerces-c_3D xerces-c_2D xerces-c_static_D xerces-c_static_3D xerces-c_static_2D
${XERCESC_LIB_PATHS}
)
if (XERCESC_LIB_OPT AND XERCESC_LIB_DBG)
set (XERCESC_LIB optimized ${XERCESC_LIB_OPT} debug ${XERCESC_LIB_DBG})
elseif (XERCESC_LIB_OPT)
set (XERCESC_LIB ${XERCESC_LIB_OPT})
elseif (XERCESC_LIB_DBG)
set (XERCESC_LIB ${XERCESC_LIB_DBG})
else ()
message (FATAL_ERROR "Unable to find xerces-c library")
endif ()
if (NOT XERCESC_INCLUDE_DIRS)
message (FATAL_ERROR "Unable to find xerces include files (xercesc/dom/DOMNode.hpp)")
else ()
message (STATUS "Found XercesC++: ${XERCESC_INCLUDE_DIRS}")
endif (NOT XERCESC_INCLUDE_DIRS)
SET (XERCESC_LIBRARIES ${XERCESC_LIB})
MARK_AS_ADVANCED(
XERCESC_LIB
XERCESC_LIBRARIES
XERCESC_INCLUDE_DIRS
XERCESC_LIB_DBG
XERCESC_LIB_OPT
)