xref: /reactos/dll/win32/ole32/CMakeLists.txt (revision c2c66aff)
1
2remove_definitions(-D_WIN32_WINNT=0x502)
3add_definitions(-D_WIN32_WINNT=0x600)
4
5add_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
13include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
14spec2def(ole32.dll ole32.spec ADD_IMPORTLIB NO_PRIVATE_WARNINGS)
15generate_idl_iids(dcom.idl)
16add_idl_headers(ole32idl dcom.idl irot.idl)
17add_rpc_files(client irot.idl)
18
19add_rpcproxy_files(
20    dcom.idl
21    ole32_unknwn.idl
22    ole32_objidl.idl
23    ole32_oleidl.idl)
24
25list(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
65if(MSVC AND (ARCH STREQUAL "i386"))
66    list(APPEND SOURCE msvc-thiscall.c)
67endif()
68
69add_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
81set_module_type(ole32 win32dll)
82target_link_libraries(ole32 wine uuid ${PSEH_LIB})
83add_delay_importlibs(ole32 oleaut32)
84add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 kernel32_vista ntdll)
85add_dependencies(ole32 ole32idl)
86add_pch(ole32 precomp.h SOURCE)
87add_cd_file(TARGET ole32 DESTINATION reactos/system32 FOR all)
88