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