[ros-diffs] [tkreuzer] 50562: [CMAKE] Link ole32 to iidlib. Fixes compilation on MSVC

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sat Jan 29 17:58:44 UTC 2011


Author: tkreuzer
Date: Sat Jan 29 17:58:43 2011
New Revision: 50562

URL: http://svn.reactos.org/svn/reactos?rev=50562&view=rev
Log:
[CMAKE]
Link ole32 to iidlib. Fixes compilation on MSVC

Modified:
    branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt

Modified: branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt?rev=50562&r1=50561&r2=50562&view=diff
==============================================================================
--- branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/dll/win32/ole32/CMakeLists.txt [iso-8859-1] Sat Jan 29 17:58:43 2011
@@ -1,3 +1,28 @@
+
+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
@@ -37,32 +62,8 @@
     stubmanager.c
     usrmarshal.c
     ole32res.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/dcom_i.c
     ${CMAKE_CURRENT_BINARY_DIR}/ole32.def)
-
-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_idl_headers(ole32idl dcom.idl irot.idl)
-
-add_rpcproxy_library(ole32proxy
-    dcom.idl
-    ole32_unknwn.idl
-    ole32_objidl.idl
-    ole32_oleidl.idl)
-    
-spec2def(ole32.dll ole32.spec)
 
 add_library(ole32 SHARED ${SOURCE})
 
@@ -74,9 +75,13 @@
     irotrpc
     uuid
     ${PSEH_LIB})
-    
+
+if(MSVC)
+    target_link_libraries(ole32 iidlib)
+endif()
+
 add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 ntdll)
-    
+
 add_dependencies(ole32 ole32idl)
 add_cab_target(ole32 1)
 add_importlib_target(ole32.spec)




More information about the Ros-diffs mailing list