[CMAKE]
[reactos.git] / reactos / dll / win32 / ole32 / CMakeLists.txt
1
2 remove_definitions(-D_WIN32_WINNT=0x502)
3 add_definitions(-D_WIN32_WINNT=0x600)
4
5 add_definitions(
6 -D__WINESRC__
7 -D_OLE32_
8 -DCOM_NO_WINDOWS_H
9 -DENTRY_PREFIX=OLE32_
10 -DPROXY_CLSID=CLSID_PSFactoryBuffer
11 -DWINE_REGISTER_DLL)
12
13 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/reactos/wine)
14 spec2def(ole32.dll ole32.spec ADD_IMPORTLIB NO_PRIVATE_WARNINGS)
15 generate_idl_iids(dcom.idl)
16 add_idl_headers(ole32idl dcom.idl irot.idl)
17 add_rpc_files(client irot.idl)
18
19 add_rpcproxy_files(
20 dcom.idl
21 ole32_unknwn.idl
22 ole32_objidl.idl
23 ole32_oleidl.idl)
24
25 list(APPEND SOURCE
26 antimoniker.c
27 bindctx.c
28 classmoniker.c
29 clipboard.c
30 comcat.c
31 compobj.c
32 compositemoniker.c
33 datacache.c
34 defaulthandler.c
35 dictionary.c
36 enumx.c
37 errorinfo.c
38 filelockbytes.c
39 filemoniker.c
40 ftmarshal.c
41 git.c
42 hglobalstream.c
43 ifs.c
44 itemmoniker.c
45 marshal.c
46 memlockbytes.c
47 moniker.c
48 ole2.c
49 ole2impl.c
50 ole2stubs.c
51 ole32_main.c
52 oleobj.c
53 oleproxy.c
54 pointermoniker.c
55 rpc.c
56 stg_prop.c
57 stg_stream.c
58 storage32.c
59 stubmanager.c
60 usrmarshal.c
61 precomp.h
62 ${CMAKE_CURRENT_BINARY_DIR}/dcom_i.c
63 ${CMAKE_CURRENT_BINARY_DIR}/irot_c.c)
64
65 if(MSVC AND (ARCH STREQUAL "i386"))
66 list(APPEND SOURCE msvc-thiscall.c)
67 endif()
68
69 add_library(ole32 SHARED
70 ${SOURCE}
71 guid.c
72 ole32res.rc
73 ${CMAKE_CURRENT_BINARY_DIR}/dcom_p.c
74 ${CMAKE_CURRENT_BINARY_DIR}/ole32_objidl_p.c
75 ${CMAKE_CURRENT_BINARY_DIR}/ole32_oleidl_p.c
76 ${CMAKE_CURRENT_BINARY_DIR}/ole32_unknwn_p.c
77 ${CMAKE_CURRENT_BINARY_DIR}/ole32_stubs.c
78 ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
79 ${CMAKE_CURRENT_BINARY_DIR}/ole32.def)
80
81 set_module_type(ole32 win32dll)
82 target_link_libraries(ole32 wine uuid ${PSEH_LIB})
83 add_delay_importlibs(ole32 oleaut32)
84 add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 kernel32_vista ntdll)
85 add_dependencies(ole32 ole32idl)
86 add_pch(ole32 precomp.h SOURCE)
87 add_cd_file(TARGET ole32 DESTINATION reactos/system32 FOR all)