[CMAKE]
[reactos.git] / dll / win32 / ole32 / CMakeLists.txt
index 3502a31..7458762 100644 (file)
@@ -1,3 +1,31 @@
+
+set_rc_compiler()
+
+spec2def(ole32.dll ole32.spec)
+generate_idl_iids(dcom.idl)
+add_idl_headers(ole32idl dcom.idl irot.idl)
+
+remove_definitions(-D_WIN32_WINNT=0x502)
+add_definitions(-D_WIN32_WINNT=0x600)
+
+add_definitions(
+    -D__WINESRC__
+    -D_OLE32_
+    -DENTRY_PREFIX=OLE32_
+    -DPROXY_CLSID=CLSID_PSFactoryBuffer
+    -DREGISTER_PROXY_DLL
+    -DCOM_NO_WINDOWS_H)
+
+include_directories(
+    ${CMAKE_CURRENT_BINARY_DIR}
+    ${REACTOS_SOURCE_DIR}/include/reactos/wine)
+
+add_rpcproxy_library(ole32proxy
+    dcom.idl
+    ole32_unknwn.idl
+    ole32_objidl.idl
+    ole32_oleidl.idl)
+
 list(APPEND SOURCE
     antimoniker.c
     bindctx.c
@@ -36,41 +64,23 @@ list(APPEND SOURCE
     stubmanager.c
     usrmarshal.c
     ole32res.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/dcom_i.c
+    ${CMAKE_CURRENT_BINARY_DIR}/ole32_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/ole32.def)
 
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
-add_definitions(-D__WINESRC__)
-add_definitions(-D_OLE32_)
-add_definitions(-DENTRY_PREFIX=OLE32_)
-add_definitions(-DPROXY_CLSID=CLSID_PSFactoryBuffer)
-add_definitions(-DREGISTER_PROXY_DLL)
-add_definitions(-DCOM_NO_WINDOWS_H)
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-
-ADD_INTERFACE_DEFINITIONS(ole32idl dcom.idl irot.idl)
-rpcproxy(ole32
-    dcom.idl
-    ole32_unknwn.idl
-    ole32_objidl.idl
-    ole32_oleidl.idl)
-    
-spec2def(ole32.dll ole32.spec)
-
 add_library(ole32 SHARED ${SOURCE})
 
 set_module_type(ole32 win32dll)
 
 target_link_libraries(ole32
+    ole32proxy
     wine
-    irot_client
-    ole32_proxy
+    irotrpc
     uuid
-    pseh)
-    
+    ${PSEH_LIB})
+
 add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 ntdll)
-    
+
 add_dependencies(ole32 ole32idl)
-add_cab_target(ole32 1)
\ No newline at end of file
+add_cd_file(TARGET ole32 DESTINATION reactos/system32 FOR all)
+add_importlib_target(ole32.spec)