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