1
2include_directories(
3    include
4    ${REACTOS_SOURCE_DIR}/sdk/lib/3rdparty/libwin-iconv
5    ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
6
7add_definitions(
8    -D__MINGW32__
9    -DLIBXML_STATIC
10    -D_REENTRANT
11    -DHAVE_WIN32_THREADS
12    -D_MBCS
13    -D_WINDOWS
14    -DWIN32
15    -DHAVE_CONFIG_H
16    -DICONV_CONST=const
17    -D_DLL -D__USE_CRTIMP)
18
19list(APPEND SOURCE
20    buf.c
21    c14n.c
22    catalog.c
23    chvalid.c
24    debugXML.c
25    dict.c
26    DOCBparser.c
27    encoding.c
28    entities.c
29    error.c
30    globals.c
31    hash.c
32    HTMLparser.c
33    HTMLtree.c
34    legacy.c
35    list.c
36    nanoftp.c
37    nanohttp.c
38    parser.c
39    parserInternals.c
40    pattern.c
41    relaxng.c
42    SAX.c
43    SAX2.c
44    threads.c
45    tree.c
46    uri.c
47    valid.c
48    xinclude.c
49    xlink.c
50    xmlIO.c
51    xmlmemory.c
52    xmlreader.c
53    xmlregexp.c
54    xmlmodule.c
55    xmlsave.c
56    xmlschemas.c
57    xmlschemastypes.c
58    xmlunicode.c
59    xmlwriter.c
60    xpath.c
61    xpointer.c
62    xmlstring.c
63    libxml.h)
64
65add_library(libxml2 ${SOURCE})
66
67if(MSVC AND (NOT USE_CLANG_CL))
68    # Unreferenced local variable
69    remove_target_compile_option(libxml2 "/we4101")
70    target_compile_options(libxml2 PRIVATE "/wd4101")
71    # Local variable initialized but not referenced
72    remove_target_compile_option(libxml2 "/we4189")
73else()
74    target_compile_options(libxml2 PRIVATE "-w")
75endif()
76
77target_link_libraries(libxml2 oldnames)
78add_pch(libxml2 libxml.h SOURCE)
79add_dependencies(libxml2 psdk)
80