1
2remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
3
4add_definitions(
5    -DUSE_WINE_TODOS
6    -DWINETEST_USE_DBGSTR_LONGLONG
7    -DPROXY_DELEGATION)
8
9include_directories(${CMAKE_CURRENT_BINARY_DIR})
10set(OLD_IDL_FLAGS ${IDL_FLAGS})
11set(IDL_FLAGS ${IDL_FLAGS} --prefix-server=s_)
12add_rpc_files(client server.idl)
13add_rpc_files(server server.idl)
14set(IDL_FLAGS ${OLD_IDL_FLAGS})
15add_rpcproxy_files(cstub.idl)
16
17list(APPEND SOURCE
18    cstub.c
19    generated.c
20    ndr_marshall.c
21    rpc.c
22    rpc_async.c
23    server.c
24    testlist.c
25    ${CMAKE_CURRENT_BINARY_DIR}/cstub_p.c
26    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
27    ${CMAKE_CURRENT_BINARY_DIR}/server_c.c
28    ${CMAKE_CURRENT_BINARY_DIR}/server_s.c)
29
30if(MSVC)
31    # The nmake generator misses this dependency, so set it explicitly until this bug is fixed.
32    set_source_files_properties(server.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/server_s.h)
33endif()
34
35add_executable(rpcrt4_winetest ${SOURCE})
36
37if(USE_CLANG_CL OR (NOT MSVC))
38    add_target_compile_flags(rpcrt4_winetest "-Wno-format")
39    if(USE_CLANG_CL)
40        add_target_compile_flags(rpcrt4_winetest "-Wno-cast-calling-convention")
41    endif()
42endif()
43
44target_link_libraries(rpcrt4_winetest uuid wine ${PSEH_LIB})
45set_module_type(rpcrt4_winetest win32cui)
46add_importlibs(rpcrt4_winetest oleaut32 ole32 rpcrt4 secur32 advapi32 msvcrt kernel32 ntdll)
47add_rostests_file(TARGET rpcrt4_winetest)
48