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_ -Os --prefix-client=mixed_)
12add_rpc_files(client server.idl)
13add_rpc_files(server server.idl)
14set(IDL_FLAGS ${OLD_IDL_FLAGS})
15set(IDL_FLAGS ${IDL_FLAGS} --prefix-server=s_ -Oicf --prefix-client=interp_)
16add_rpc_files(client server_interp.idl)
17add_rpc_files(server server_interp.idl)
18set(IDL_FLAGS ${OLD_IDL_FLAGS})
19add_rpcproxy_files(cstub.idl)
20
21list(APPEND SOURCE
22    cstub.c
23    generated.c
24    ndr_marshall.c
25    rpc.c
26    rpc_async.c
27    server.c
28    testlist.c
29    ${CMAKE_CURRENT_BINARY_DIR}/cstub_p.c
30    ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
31    ${CMAKE_CURRENT_BINARY_DIR}/server_c.c
32    ${CMAKE_CURRENT_BINARY_DIR}/server_s.c
33    ${CMAKE_CURRENT_BINARY_DIR}/server_interp_c.c
34    ${CMAKE_CURRENT_BINARY_DIR}/server_interp_s.c)
35
36if(MSVC)
37    # The nmake generator misses this dependency, so set it explicitly until this bug is fixed.
38    set_source_files_properties(server.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/server_s.h)
39endif()
40
41add_executable(rpcrt4_winetest ${SOURCE})
42
43if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
44    target_compile_options(rpcrt4_winetest PRIVATE "-Wno-format")
45endif()
46
47if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
48    target_compile_options(rpcrt4_winetest PRIVATE "-Wno-cast-calling-convention")
49endif()
50
51target_link_libraries(rpcrt4_winetest uuid wine ${PSEH_LIB})
52set_module_type(rpcrt4_winetest win32cui)
53add_importlibs(rpcrt4_winetest oleaut32 ole32 rpcrt4 secur32 advapi32 msvcrt kernel32 ntdll)
54add_rostests_file(TARGET rpcrt4_winetest)
55