1c2c66affSColin Finck
2c2c66affSColin Finckinclude_directories(
3c2c66affSColin Finck    include
4c2c66affSColin Finck    ${REACTOS_SOURCE_DIR}/sdk/lib/3rdparty/libwin-iconv
5c2c66affSColin Finck    ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
6c2c66affSColin Finck
7c2c66affSColin Finckadd_definitions(
8c2c66affSColin Finck    -D__MINGW32__
9c2c66affSColin Finck    -DLIBXML_STATIC
10c2c66affSColin Finck    -D_REENTRANT
11c2c66affSColin Finck    -DHAVE_WIN32_THREADS
12c2c66affSColin Finck    -D_MBCS
13c2c66affSColin Finck    -D_WINDOWS
14c2c66affSColin Finck    -DWIN32
15c2c66affSColin Finck    -DHAVE_CONFIG_H
16c2c66affSColin Finck    -DICONV_CONST=const
17c2c66affSColin Finck    -D_DLL -D__USE_CRTIMP)
18c2c66affSColin Finck
19c2c66affSColin Fincklist(APPEND SOURCE
20c2c66affSColin Finck    buf.c
21c2c66affSColin Finck    c14n.c
22c2c66affSColin Finck    catalog.c
23c2c66affSColin Finck    chvalid.c
24c2c66affSColin Finck    debugXML.c
25c2c66affSColin Finck    dict.c
26c2c66affSColin Finck    encoding.c
27c2c66affSColin Finck    entities.c
28c2c66affSColin Finck    error.c
29c2c66affSColin Finck    globals.c
30c2c66affSColin Finck    hash.c
31c2c66affSColin Finck    HTMLparser.c
32c2c66affSColin Finck    HTMLtree.c
33c2c66affSColin Finck    legacy.c
34c2c66affSColin Finck    list.c
35c2c66affSColin Finck    nanoftp.c
36c2c66affSColin Finck    nanohttp.c
37c2c66affSColin Finck    parser.c
38c2c66affSColin Finck    parserInternals.c
39c2c66affSColin Finck    pattern.c
40c2c66affSColin Finck    relaxng.c
41c2c66affSColin Finck    SAX.c
42c2c66affSColin Finck    SAX2.c
43c2c66affSColin Finck    threads.c
44c2c66affSColin Finck    tree.c
45c2c66affSColin Finck    uri.c
46c2c66affSColin Finck    valid.c
47c2c66affSColin Finck    xinclude.c
48c2c66affSColin Finck    xlink.c
49c2c66affSColin Finck    xmlIO.c
50c2c66affSColin Finck    xmlmemory.c
51c2c66affSColin Finck    xmlreader.c
52c2c66affSColin Finck    xmlregexp.c
53c2c66affSColin Finck    xmlmodule.c
54c2c66affSColin Finck    xmlsave.c
55c2c66affSColin Finck    xmlschemas.c
56c2c66affSColin Finck    xmlschemastypes.c
57c2c66affSColin Finck    xmlunicode.c
58c2c66affSColin Finck    xmlwriter.c
59c2c66affSColin Finck    xpath.c
60c2c66affSColin Finck    xpointer.c
61c2c66affSColin Finck    xmlstring.c
62c2c66affSColin Finck    libxml.h)
63c2c66affSColin Finck
64c2c66affSColin Finckadd_library(libxml2 ${SOURCE})
65c2c66affSColin Finck
66*f155b937SVictor Perevertkinif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
6780296be1SThomas Faber    # Unreferenced local variable
687e116f0eSJérôme Gardou    remove_target_compile_option(libxml2 "/we4101")
697e069ccdSVictor Perevertkin    target_compile_options(libxml2 PRIVATE "/wd4101")
70c2c66affSColin Finck    # Local variable initialized but not referenced
717e116f0eSJérôme Gardou    remove_target_compile_option(libxml2 "/we4189")
72c2c66affSColin Finckelse()
737e069ccdSVictor Perevertkin    target_compile_options(libxml2 PRIVATE "-w")
74c2c66affSColin Finckendif()
7500124d1bSAmine Khaldi
7600124d1bSAmine Khalditarget_link_libraries(libxml2 oldnames)
7700124d1bSAmine Khaldiadd_pch(libxml2 libxml.h SOURCE)
7800124d1bSAmine Khaldiadd_dependencies(libxml2 psdk)
79