[CMAKE] Use modules instead of shared libraries
[reactos.git] / dll / win32 / rpcrt4 / 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_RPCRT4_
8 -DCOM_NO_WINDOWS_H
9 -DMSWMSG)
10
11 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
12 spec2def(rpcrt4.dll rpcrt4.spec ADD_IMPORTLIB)
13
14 add_rpc_files(client epm.idl)
15 add_idl_headers(ndr_types_header ndr_types.idl)
16
17 set(OLD_IDL_FLAGS ${IDL_FLAGS})
18 set(IDL_FLAGS ${IDL_FLAGS} -Oicf)
19 add_rpcproxy_files(ndr_types.idl)
20 set(IDL_FLAGS ${OLD_IDL_FLAGS})
21
22 list(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 precomp.h
43 ${CMAKE_CURRENT_BINARY_DIR}/epm_c.c)
44
45 if(MSVC AND NOT ARCH STREQUAL "arm")
46 add_asm_files(rpcrt4_asm msvc.S)
47 endif()
48
49 add_library(rpcrt4 MODULE
50 ${SOURCE}
51 ndr_typelib.c
52 ${CMAKE_CURRENT_BINARY_DIR}/ndr_types_p.c
53 ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
54 ${rpcrt4_asm}
55 rpcrt4.rc
56 ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4_stubs.c
57 ${CMAKE_CURRENT_BINARY_DIR}/rpcrt4.def)
58
59 set_module_type(rpcrt4 win32dll)
60 target_link_libraries(rpcrt4 wine uuid ${PSEH_LIB})
61 add_delay_importlibs(rpcrt4 iphlpapi wininet secur32 user32 oleaut32)
62 add_importlibs(rpcrt4 advapi32 advapi32_vista kernel32_vista ws2_32 msvcrt kernel32 ntdll)
63 add_dependencies(rpcrt4 ndr_types_header)
64 add_pch(rpcrt4 precomp.h SOURCE)
65 add_cd_file(TARGET rpcrt4 DESTINATION reactos/system32 FOR all)