add_definitions(
-D__WINESRC__
-D_OLE32_
+ -D__ROS_LONG64__
-DCOM_NO_WINDOWS_H
-DENTRY_PREFIX=OLE32_
-DPROXY_CLSID=CLSID_PSFactoryBuffer
-DWINE_REGISTER_DLL)
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-
-spec2def(ole32.dll ole32.spec ADD_IMPORTLIB)
+include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
+spec2def(ole32.dll ole32.spec ADD_IMPORTLIB NO_PRIVATE_WARNINGS)
generate_idl_iids(dcom.idl)
add_idl_headers(ole32idl dcom.idl irot.idl)
add_rpc_files(client irot.idl)
stg_stream.c
storage32.c
stubmanager.c
- usrmarshal.c
- precomp.h
- ${CMAKE_CURRENT_BINARY_DIR}/dcom_i.c
- ${CMAKE_CURRENT_BINARY_DIR}/irot_c.c)
+ usrmarshal.c)
if(MSVC AND (ARCH STREQUAL "i386"))
list(APPEND SOURCE msvc-thiscall.c)
endif()
-add_library(ole32 SHARED
- ${SOURCE}
+list(APPEND PCH_SKIP_SOURCE
guid.c
- ole32res.rc
${CMAKE_CURRENT_BINARY_DIR}/dcom_p.c
${CMAKE_CURRENT_BINARY_DIR}/ole32_objidl_p.c
${CMAKE_CURRENT_BINARY_DIR}/ole32_oleidl_p.c
${CMAKE_CURRENT_BINARY_DIR}/ole32_unknwn_p.c
${CMAKE_CURRENT_BINARY_DIR}/ole32_stubs.c
- ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
+ ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c)
+
+add_library(ole32 MODULE
+ ${SOURCE}
+ ${PCH_SKIP_SOURCE}
+ ole32res.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/dcom_i.c
+ ${CMAKE_CURRENT_BINARY_DIR}/irot_c.c
${CMAKE_CURRENT_BINARY_DIR}/ole32.def)
+if(MSVC)
+ # Disable warning C4090: '=': different 'const' qualifiers
+ # Disable warning C4146: unary minus operator applied to unsigned type, result still unsigned
+ target_compile_options(ole32 PRIVATE /wd4090 /wd4146)
+endif()
+
set_module_type(ole32 win32dll)
target_link_libraries(ole32 wine uuid ${PSEH_LIB})
-add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 ntdll)
add_delay_importlibs(ole32 oleaut32)
+add_importlibs(ole32 advapi32 user32 gdi32 rpcrt4 msvcrt kernel32 kernel32_vista ntdll)
add_dependencies(ole32 ole32idl)
-add_pch(ole32 precomp.h SOURCE)
+add_pch(ole32 precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET ole32 DESTINATION reactos/system32 FOR all)