1 2remove_definitions(-D_WIN32_WINNT=0x502 -D_CRT_NON_CONFORMING_SWPRINTFS) 3add_definitions(-D_WIN32_WINNT=0x600) 4 5include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) 6add_definitions(-D__WINESRC__ -D__ROS_LONG64__ -DMSIRUNMODE=MSIRUNMODE_T) 7spec2def(msi.dll msi.spec ADD_IMPORTLIB) 8generate_idl_iids(msiserver.idl) 9generate_idl_iids(winemsi.idl) 10 11list(APPEND SOURCE 12 action.c 13 alter.c 14 appsearch.c 15 assembly.c 16 automation.c 17 classes.c 18 create.c 19 database.c 20 delete.c 21 dialog.c 22 distinct.c 23 drop.c 24 files.c 25 font.c 26 format.c 27 handle.c 28 insert.c 29 install.c 30 media.c 31 msi.c 32 msi_main.c 33 msiquery.c 34 package.c 35 patch.c 36 record.c 37 registry.c 38 script.c 39 select.c 40 source.c 41 storages.c 42 streams.c 43 string.c 44 table.c 45 tokenize.c 46 update.c 47 upgrade.c 48 where.c) 49 50BISON_TARGET(cond cond.y ${CMAKE_CURRENT_BINARY_DIR}/cond.tab.c) 51BISON_TARGET(sql sql.y ${CMAKE_CURRENT_BINARY_DIR}/sql.tab.c) 52 53set(OLD_IDL_FLAGS ${IDL_FLAGS}) 54set(IDL_FLAGS ${IDL_FLAGS} --prefix-server=s_) 55add_rpc_files(client winemsi.idl) 56add_rpc_files(server winemsi.idl) 57set(IDL_FLAGS ${OLD_IDL_FLAGS}) 58 59list(APPEND PCH_SKIP_SOURCE 60 custom.c # Need custom defines for WIN32_NO_STATUS 61 suminfo.c # The only file without NONAMELESSUNION 62 ${BISON_cond_OUTPUTS} 63 ${BISON_sql_OUTPUTS} 64 ${CMAKE_CURRENT_BINARY_DIR}/msiserver_i.c 65 ${CMAKE_CURRENT_BINARY_DIR}/winemsi_c.c 66 ${CMAKE_CURRENT_BINARY_DIR}/winemsi_s.c 67 ${CMAKE_CURRENT_BINARY_DIR}/msi_stubs.c) 68 69add_library(msi MODULE 70 ${SOURCE} 71 ${PCH_SKIP_SOURCE} 72 msi.rc 73 ${CMAKE_CURRENT_BINARY_DIR}/msi.def) 74 75if(MSVC) 76 # Disable warning C4090: 'function': different 'const' qualifiers 77 # Disable warning C4133: 'function': incompatible types - from 'UINT *' to 'MSIINSTALLCONTEXT *' 78 # Disable warning C4146: unary minus operator applied to unsigned type, result still unsigned 79 # Disable warning C4312: 'type cast': conversion from 'unsigned int' to 'HANDLE' of greater size 80 target_compile_options(msi PRIVATE /wd4090 /wd4133 /wd4146 /wd4312) 81endif() 82 83add_idl_headers(msi_idlheader msiserver.idl winemsi.idl) 84add_typelib(msiserver.idl winemsi.idl) 85set_source_files_properties(msi.rc PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/msiserver.tlb;${CMAKE_CURRENT_BINARY_DIR}/winemsi.tlb") 86set_module_type(msi win32dll) 87target_link_libraries(msi uuid ${PSEH_LIB} wine_dll_register oldnames) 88add_dependencies(msi msi_idlheader) 89add_delay_importlibs(msi odbccp32 crypt32 wintrust apphelp) 90add_importlibs(msi advapi32 advapi32_vista cabinet comctl32 gdi32 ole32 oleaut32 shell32 shlwapi rpcrt4 urlmon user32 version wininet sxs 91 #FIXME : imagehlp, mspatcha should be in delayed imports 92 imagehlp 93 mspatcha 94 msvcrt 95 kernel32_vista 96 kernel32 97 ntdll) 98 99add_pch(msi precomp.h "${PCH_SKIP_SOURCE}") 100add_cd_file(TARGET msi DESTINATION reactos/system32 FOR all) 101