1
2include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl)
3add_rpc_files(server ${REACTOS_SOURCE_DIR}/sdk/include/reactos/idl/winspool.idl)
4
5spec2def(spoolsv.exe spoolsv.spec ADD_IMPORTLIB)
6
7list(APPEND SOURCE
8    forms.c
9    init.c
10    jobs.c
11    main.c
12    monitors.c
13    notifications.c
14    ports.c
15    precomp.h
16    printerdata.c
17    printerdrivers.c
18    printers.c
19    printprocessors.c
20    printproviders.c
21    rpcserver.c
22    rpcstubs.c
23    spoolfile.c
24    xcv.c
25    ${CMAKE_CURRENT_BINARY_DIR}/winspool_s.c
26    ${CMAKE_CURRENT_BINARY_DIR}/spoolsv_stubs.c)
27
28add_executable(spoolsv
29    ${SOURCE}
30    spoolsv.rc
31    ${CMAKE_CURRENT_BINARY_DIR}/spoolsv.def)
32
33set_target_properties(spoolsv
34    PROPERTIES
35    ENABLE_EXPORTS TRUE
36    DEFINE_SYMBOL "")
37
38if(USE_CLANG_CL)
39    target_compile_options(spoolsv PRIVATE "-Wno-cast-calling-convention")
40endif()
41
42set_module_type(spoolsv win32cui UNICODE)
43target_link_libraries(spoolsv wine)
44add_delay_importlibs(spoolsv spoolss)
45add_importlibs(spoolsv advapi32 rpcrt4 msvcrt kernel32 ntdll)
46add_pch(spoolsv precomp.h SOURCE)
47add_cd_file(TARGET spoolsv DESTINATION reactos/system32 FOR all)
48