xref: /reactos/dll/win32/rpcrt4/CMakeLists.txt (revision 9393fc32)
1
2remove_definitions(-D_WIN32_WINNT=0x502)
3add_definitions(-D_WIN32_WINNT=0x600)
4
5add_definitions(
6    -D__WINESRC__
7    -D_RPCRT4_
8    -DCOM_NO_WINDOWS_H
9    -DMSWMSG)
10
11include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
12spec2def(rpcrt4.dll rpcrt4.spec ADD_IMPORTLIB)
13
14add_rpc_files(client epm.idl)
15add_idl_headers(ndr_types_header ndr_types.idl)
16
17set(OLD_IDL_FLAGS ${IDL_FLAGS})
18set(IDL_FLAGS ${IDL_FLAGS} -Oicf)
19add_rpcproxy_files(ndr_types.idl)
20set(IDL_FLAGS ${OLD_IDL_FLAGS})
21
22list(APPEND SOURCE
23    cproxy.c
24    cpsf.c
25    cstub.c
26    ndr_clientserver.c
27    ndr_contexthandle.c
28    ndr_es.c
29    ndr_fullpointer.c
30    ndr_marshall.c
31    ndr_ole.c
32    ndr_stubless.c
33    rpc_assoc.c
34    rpc_async.c
35    rpc_binding.c
36    rpc_epmap.c
37    rpc_message.c
38    rpcrt4_main.c
39    rpc_server.c
40    rpc_transport.c
41    unix_func.c
42    ${CMAKE_CURRENT_BINARY_DIR}/epm_c.c)
43
44if(MSVC)
45    add_asm_files(rpcrt4_asm msvc.S)
46endif()
47
48list(APPEND PCH_SKIP_SOURCE
49    ndr_typelib.c
50    ${CMAKE_CURRENT_BINARY_DIR}/ndr_types_p.c
51    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
52    ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4_stubs.c)
53
54add_library(rpcrt4 MODULE
55    ${SOURCE}
56    ${rpcrt4_asm}
57    ${PCH_SKIP_SOURCE}
58    rpcrt4.rc
59    ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4.def)
60
61if(MSVC)
62    # Disable warning C4267: '=': conversion from 'size_t' to 'short', possible loss of data
63    target_compile_options(rpcrt4 PRIVATE /wd4267)
64endif()
65
66set_module_type(rpcrt4 win32dll)
67target_link_libraries(rpcrt4 wine uuid ${PSEH_LIB})
68add_delay_importlibs(rpcrt4 iphlpapi wininet secur32 user32 oleaut32)
69add_importlibs(rpcrt4 advapi32 advapi32_vista kernel32_vista ws2_32 msvcrt kernel32 ntdll)
70add_dependencies(rpcrt4 ndr_types_header)
71add_pch(rpcrt4 precomp.h "${PCH_SKIP_SOURCE}")
72add_cd_file(TARGET rpcrt4 DESTINATION reactos/system32 FOR all)
73