[WINETESTS]
[reactos.git] / rostests / winetests / rpcrt4 / CMakeLists.txt
1
2 remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502)
3
4 add_definitions(-D__ROS_LONG64__)
5
6 include_directories(${CMAKE_CURRENT_BINARY_DIR})
7
8 if(MSVC)
9 set(IDL_FLAGS ${IDL_FLAGS} /prefix server s_ /app_config)
10 else()
11 set(IDL_FLAGS ${IDL_FLAGS} --prefix-server=s_)
12 endif()
13
14 add_rpc_files(client server.idl)
15 add_rpc_files(server server.idl)
16 unset(IDL_FLAGS)
17
18 list(APPEND SOURCE
19 cstub.c
20 generated.c
21 ndr_marshall.c
22 rpc.c
23 rpc_async.c
24 rpc_protseq.c
25 server.c
26 testlist.c
27 ${CMAKE_CURRENT_BINARY_DIR}/server_c.c
28 ${CMAKE_CURRENT_BINARY_DIR}/server_s.c)
29
30 if(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)
33 endif()
34
35 add_executable(rpcrt4_winetest ${SOURCE})
36 target_link_libraries(rpcrt4_winetest
37 uuid
38 wine
39 ${PSEH_LIB})
40
41 set_module_type(rpcrt4_winetest win32cui)
42 add_importlibs(rpcrt4_winetest ole32 rpcrt4 msvcrt kernel32 ntdll)
43 add_cd_file(TARGET rpcrt4_winetest DESTINATION reactos/bin FOR all)
44
45 if(NOT MSVC)
46 add_target_compile_flags(rpcrt4_winetest "-Wno-format")
47 endif()