[CMAKE] Add some -D__ROS_LONG64__ to please gcc x64
[reactos.git] / dll / win32 / msxml3 / CMakeLists.txt
1
2 add_definitions(
3 -D__WINESRC__
4 -D__ROS_LONG64__
5 -D_WINE
6 -DLIBXML_STATIC
7 -DCOM_NO_WINDOWS_H)
8
9 if(MSVC)
10 add_compile_flags("/FIwine/typeof.h /FImsvc.h")
11 endif()
12
13 include_directories(
14 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine
15 ${REACTOS_SOURCE_DIR}/sdk/lib/3rdparty/libwin-iconv)
16
17 spec2def(msxml3.dll msxml3.spec ADD_IMPORTLIB NO_PRIVATE_WARNINGS)
18 add_typelib(msxml3_v1.idl)
19
20 list(APPEND SOURCE
21 attribute.c
22 bsc.c
23 cdata.c
24 comment.c
25 dispex.c
26 docfrag.c
27 doctype.c
28 domdoc.c
29 domimpl.c
30 element.c
31 entityref.c
32 httprequest.c
33 main.c
34 mxnamespace.c
35 mxwriter.c
36 node.c
37 nodelist.c
38 nodemap.c
39 parseerror.c
40 pi.c
41 saxreader.c
42 schema.c
43 selection.c
44 stylesheet.c
45 text.c
46 xdr.c
47 xmldoc.c
48 xmlelem.c
49 xmlparser.c
50 xmlview.c
51 precomp.h
52 ${CMAKE_CURRENT_BINARY_DIR}/msxml3_stubs.c)
53
54 # xslpattern.tab.c/xslpattern.yy.c have been generated with relative file paths...
55 set_source_files_properties(xslpattern.tab.c xslpattern.yy.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
56
57 list(APPEND msxml3_rc_deps
58 ${CMAKE_CURRENT_SOURCE_DIR}/msxml3.manifest
59 ${CMAKE_CURRENT_SOURCE_DIR}/msxml3_v1.rgs
60 ${CMAKE_CURRENT_SOURCE_DIR}/xmlparser.rgs
61 ${CMAKE_CURRENT_BINARY_DIR}/msxml3_v1.tlb)
62
63 set_source_files_properties(version.rc PROPERTIES OBJECT_DEPENDS "${msxml3_rc_deps}")
64
65 add_library(msxml3 MODULE
66 ${SOURCE}
67 xslpattern.tab.c
68 xslpattern.yy.c
69 factory.c
70 uuid.c
71 version.rc
72 ${CMAKE_CURRENT_BINARY_DIR}/msxml3.def)
73
74 add_idl_headers(xmlparser_idlheader xmlparser.idl)
75 set_module_type(msxml3 win32dll)
76 target_link_libraries(msxml3 libxml2 iconv-static uuid wine zlib)
77 add_importlibs(msxml3 urlmon ws2_32 shlwapi oleaut32 ole32 user32 msvcrt kernel32 ntdll)
78 add_dependencies(msxml3 xmlparser_idlheader stdole2) # msxml3_v1.tlb needs stdole2.tlb
79 add_pch(msxml3 precomp.h SOURCE)
80 add_cd_file(TARGET msxml3 DESTINATION reactos/system32 FOR all)