[HNETCFG_WINETEST] Sync with Wine Staging 4.18. CORE-16441
[reactos.git] / dll / 3rdparty / libtirpc / CMakeLists.txt
1 spec2def(libtirpc.dll libtirpc/libtirpc.spec ADD_IMPORTLIB)
2
3 remove_definitions(-D_WIN32_WINNT=0x502)
4 add_definitions(-D_WIN32_WINNT=0x600)
5 add_definitions(-DUNICODE -D_WIN32 -DPORTMAP -Dstrdup=_strdup -D_CRT_NONSTDC_NO_DEPRECATE=1)
6
7 include_directories(${REACTOS_SOURCE_DIR}/dll/3rdparty/libtirpc/tirpc)
8
9 if(MSVC)
10 # error C4133: '=': incompatible types - from 'char *' to 'int32_t *'
11 replace_compile_flags("/we4133" " ")
12
13 # Disable warning C4477 (printf format warnings)
14 add_compile_flags("/wd4313")
15 endif()
16
17 list(APPEND SOURCE
18 src/asprintf.c
19 # src/auth_des.c
20 src/authdes_prot.c
21 # src/auth_gss.c
22 # src/authgss_prot.c
23 src/auth_none.c
24 src/auth_sspi.c
25 src/authsspi_prot.c
26 src/auth_time.c
27 src/auth_unix.c
28 src/authunix_prot.c
29 src/bindresvport.c
30 src/clnt_bcast.c
31 src/clnt_dg.c
32 src/clnt_generic.c
33 src/clnt_perror.c
34 src/clnt_raw.c
35 src/clnt_simple.c
36 src/clnt_vc.c
37 # src/crypt_client.c
38 # src/des_crypt.c
39 src/des_soft.c
40 src/epoll_sub.c
41 src/getnetconfig.c
42 src/getnetpath.c
43 src/getpeereid.c
44 src/getpublickey.c
45 src/getrpcent.c
46 src/getrpcport.c
47 src/gettimeofday.c
48 src/key_call.c
49 src/key_prot_xdr.c
50 #src/makefile
51 #src/Makefile.am
52 src/mt_misc.c
53 src/netname.c
54 src/netnamer.c
55 src/pmap_clnt.c
56 src/pmap_getmaps.c
57 src/pmap_getport.c
58 src/pmap_prot2.c
59 src/pmap_prot.c
60 src/pmap_rmt.c
61 src/rpcb_clnt.c
62 src/rpcb_prot.c
63 src/rpcb_st_xdr.c
64 src/rpc_callmsg.c
65 src/rpc_com.h
66 src/rpc_commondata.c
67 src/rpcdname.c
68 src/rpc_dtablesize.c
69 src/rpc_generic.c
70 src/rpc_prot.c
71 src/rpc_soc.c
72 src/rtime.c
73 src/sources
74 src/svc_auth.c
75 # src/svc_auth_des.c
76 # src/svc_auth_gss.c
77 src/svc_auth_none.c
78 src/svc_auth_unix.c
79 src/svc.c
80 src/svc_dg.c
81 src/svc_generic.c
82 src/svc_raw.c
83 src/svc_run.c
84 src/svc_simple.c
85 src/svc_vc.c
86 src/winstubs.c
87 src/wintirpc.c
88 src/xdr_array.c
89 src/xdr.c
90 src/xdr_float.c
91 src/xdr_mem.c
92 src/xdr_rec.c
93 src/xdr_reference.c
94 src/xdr_sizeof.c
95 src/xdr_stdio.c
96 precomp.h)
97
98 add_library(libtirpc MODULE
99 ${SOURCE}
100 # libtirpc/libtirpc.rc
101 libtirpc/libtirpc_ros.rc
102 ${CMAKE_CURRENT_BINARY_DIR}/libtirpc.def)
103
104 if(MSVC AND (NOT USE_CLANG_CL))
105 add_target_compile_flags(libtirpc "/wd4101 /wd4133 /wd4473 /wd4477")
106 else()
107 # FIXME: Tons of warnings.
108 add_target_compile_flags(libtirpc "-w")
109 endif()
110
111 set_module_type(libtirpc win32dll)
112 add_importlibs(libtirpc user32 advapi32 kernel32_vista ws2_32 msvcrt kernel32 ntdll)
113 add_delay_importlibs(libtirpc secur32)
114 add_pch(libtirpc precomp.h SOURCE)
115 add_cd_file(TARGET libtirpc DESTINATION reactos/system32 FOR all)