xref: /reactos/base/services/nfsd/CMakeLists.txt (revision 4d3df0da)
1remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502)
2add_definitions(-D_WIN32_WINNT=0x601)
3add_definitions(-DNTDDI_VERSION=0x06010000)
4
5include_directories(
6    ${REACTOS_SOURCE_DIR}/dll/3rdparty/libtirpc/tirpc
7    ${REACTOS_SOURCE_DIR}/drivers/filesystems/nfs
8    ${REACTOS_SOURCE_DIR}/dll/np/nfs)
9
10if (MSVC)
11    # Disable warning C4477 (printf format warnings)
12    add_compile_flags("/wd4477")
13endif()
14
15list(APPEND SOURCE
16    acl.c
17    callback_server.c
18    callback_xdr.c
19    daemon_debug.c
20    delegation.c
21    ea.c
22    getattr.c
23    idmap.c
24    lock.c
25    lookup.c
26    mount.c
27    name_cache.c
28    namespace.c
29    nfs41_client.c
30    nfs41_compound.c
31    nfs41_daemon.c
32    nfs41_ops.c
33    nfs41_rpc.c
34    nfs41_server.c
35    nfs41_session.c
36    nfs41_superblock.c
37    nfs41_xdr.c
38    open.c
39    pnfs_debug.c
40    pnfs_device.c
41    pnfs_io.c
42    pnfs_layout.c
43    readdir.c
44    readwrite.c
45    recovery.c
46    service.c
47    setattr.c
48    symlink.c
49    upcall.c
50    util.c
51    volume.c
52    precomp.h)
53
54add_executable(nfsd ${SOURCE} nfsd.rc)
55
56if(MSVC AND (NOT USE_CLANG_CL))
57else()
58    # FIXME: Tons of warnings.
59    add_target_compile_flags(nfsd "-w")
60endif()
61
62set_module_type(nfsd win32cui)
63add_importlibs(nfsd advapi32 iphlpapi kernel32_vista libtirpc msvcrt shell32 ws2_32 wldap32 kernel32 ntdll)
64add_pch(nfsd precomp.h SOURCE)
65add_cd_file(TARGET nfsd DESTINATION reactos/system32 FOR all)
66add_cd_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/netconfig" DESTINATION reactos/system32/drivers/etc FOR all)
67add_cd_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/ms-nfs41-idmap.conf" DESTINATION reactos/system32/drivers/etc FOR all)
68