Revert "[CMAKE/RPC]"
[reactos.git] / reactos / base / system / services / CMakeLists.txt
index 162f668..c3ea514 100644 (file)
@@ -1,26 +1,31 @@
 
-set_unicode()
-
 include_directories(
-    ${REACTOS_BINARY_DIR}/include/reactos/idl
-    ${REACTOS_SOURCE_DIR}/include/reactos/subsys)
+    ${REACTOS_SOURCE_DIR}/include/reactos/subsys
+    ${REACTOS_SOURCE_DIR}/include/reactos/idl
+    ${CMAKE_CURRENT_BINARY_DIR})
+
+add_rpc_files(server ${REACTOS_SOURCE_DIR}/include/reactos/idl/svcctl.idl)
+
 
 list(APPEND SOURCE
     config.c
+    controlset.c
     database.c
     driver.c
     groupdb.c
+    lock.c
     rpcserver.c
     services.c
-    services.rc)
+    services.h
+    ${CMAKE_CURRENT_BINARY_DIR}/svcctl_s.c)
 
-add_executable(services ${SOURCE})
+add_executable(services ${SOURCE} services.rc)
 
-target_link_libraries(services
-    svcctlrpc
-    ${PSEH_LIB})
+if(NOT MSVC)
+    target_link_libraries(services ${PSEH_LIB})
+endif()
 
-set_module_type(services win32cui)
+set_module_type(services win32gui UNICODE)
 add_importlibs(services user32 advapi32 rpcrt4 msvcrt kernel32 ntdll)
-add_pch(services services.h)
+add_pch(services services.h SOURCE)
 add_cd_file(TARGET services DESTINATION reactos/system32 FOR all)