forked from GNOME/libxml2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
194 lines (179 loc) · 3.8 KB
/
CMakeLists.txt
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
cmake_minimum_required(VERSION 2.6)
project(libxml2)
option(BUILD_SHARED_LIBS "build a shared library" OFF)
if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
set(CMAKE_DEBUG_POSTFIX "d")
endif()
set(VERSION "2.9.2")
set(LIBXML_VERSION_NUMBER 20902)
set(LIBXML_VERSION_EXTRA)
set(WITH_TRIO 0)
set(WITH_THREADS 1)
set(WITH_THREAD_ALLOC 1)
set(WITH_TREE 1)
set(WITH_OUTPUT 1)
set(WITH_PUSH 1)
set(WITH_READER 1)
set(WITH_PATTERN 0)
set(WITH_WRITER 0)
set(WITH_SAX1 1)
set(WITH_FTP 0)
set(WITH_HTTP 0)
set(WITH_VALID 0)
set(WITH_HTML 0)
set(WITH_LEGACY 0)
set(WITH_C14N 0)
set(WITH_CATALOG 0)
set(WITH_DOCB 0)
set(WITH_XPATH 0)
set(WITH_XPTR 0)
set(WITH_XINCLUDE 0)
set(WITH_ICONV 0)
set(WITH_ICU 0)
set(WITH_ISO8859X 0)
set(WITH_DEBUG 0)
set(WITH_MEM_DEBUG 0)
set(WITH_RUN_DEBUG 0)
set(WITH_REGEXPS 0)
set(WITH_SCHEMAS 0)
set(WITH_SCHEMATRON 0)
set(WITH_MODULES 0)
set(WITH_ZLIB 0)
set(WITH_LZMA 0)
add_definitions(-DUNICODE -D_UNICODE)
set(LIBXML2_SOURCES
buf.c
c14n.c
catalog.c
chvalid.c
debugXML.c
dict.c
DOCBparser.c
encoding.c
entities.c
error.c
globals.c
hash.c
HTMLparser.c
HTMLtree.c
legacy.c
list.c
nanoftp.c
nanohttp.c
parser.c
parserInternals.c
pattern.c
relaxng.c
SAX.c
SAX2.c
schematron.c
threads.c
tree.c
uri.c
valid.c
xinclude.c
xlink.c
xmlcatalog.c
xmlIO.c
xmlmemory.c
xmlmodule.c
xmlreader.c
xmlregexp.c
xmlsave.c
xmlschemas.c
xmlschemastypes.c
xmlstring.c
xmlunicode.c
xmlwriter.c
xpath.c
xpointer.c
)
set(LIBXML2_PUBLIC_HEADERS
include/libxml/c14n.h
include/libxml/catalog.h
include/libxml/chvalid.h
include/libxml/debugXML.h
include/libxml/dict.h
include/libxml/DOCBparser.h
include/libxml/encoding.h
include/libxml/entities.h
include/libxml/globals.h
include/libxml/hash.h
include/libxml/HTMLparser.h
include/libxml/HTMLtree.h
include/libxml/list.h
include/libxml/Makefile.am
include/libxml/nanoftp.h
include/libxml/nanohttp.h
include/libxml/parser.h
include/libxml/parserInternals.h
include/libxml/pattern.h
include/libxml/relaxng.h
include/libxml/SAX.h
include/libxml/SAX2.h
include/libxml/schemasInternals.h
include/libxml/schematron.h
include/libxml/threads.h
include/libxml/tree.h
include/libxml/uri.h
include/libxml/valid.h
include/libxml/xinclude.h
include/libxml/xlink.h
include/libxml/xmlautomata.h
include/libxml/xmlerror.h
include/libxml/xmlexports.h
include/libxml/xmlIO.h
include/libxml/xmlmemory.h
include/libxml/xmlmodule.h
include/libxml/xmlreader.h
include/libxml/xmlregexp.h
include/libxml/xmlsave.h
include/libxml/xmlschemas.h
include/libxml/xmlschemastypes.h
include/libxml/xmlstring.h
include/libxml/xmlunicode.h
include/libxml/xmlwriter.h
include/libxml/xpath.h
include/libxml/xpathInternals.h
include/libxml/xpointer.h
include/win32config.h
include/wsockcompat.h
)
include_directories(include)
set(LIBXML2_PRIVATE_HEADERS
buf.h
elfgcchack.h
enc.h
libxml.h
save.h
testOOMlib.h
timsort.h
trio.h
triodef.h
trionan.h
triop.h
triostr.h
xzlib.h
)
configure_file(include/libxml/xmlversion.h.in libxml/xmlversion.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(MSVC)
list(APPEND LIBXML2_PRIVATE_HEADERS win32/VC10/config.h)
include_directories(win32/VC10)
endif()
add_library(xml2 ${LIBXML2_SOURCES} ${LIBXML2_PRIVATE_HEADERS} ${LIBXML2_PUBLIC_HEADERS} "${CMAKE_CURRENT_BINARY_DIR}/libxml/xmlversion.h")
install(TARGETS xml2
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
if(MSVC)
if(BUILD_SHARED_LIBS)
install(FILES "$<TARGET_PDB_FILE:xml2>" DESTINATION bin)
endif()
endif()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libxml/xmlversion.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/libxml")
foreach(header ${LIBXML2_PUBLIC_HEADERS})
string(REGEX REPLACE "include/?(.*)/[^/]+" "\\1" dir "${header}")
install(FILES "${header}" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/${dir}")
endforeach()