1 2remove_definitions(-D_WIN32_WINNT=0x502) 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) 9 10list(APPEND SOURCE 11 action.c 12 alter.c 13 appsearch.c 14 assembly.c 15 automation.c 16 classes.c 17 create.c 18 custom.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 suminfo.c 45 table.c 46 tokenize.c 47 update.c 48 upgrade.c 49 where.c) 50 51BISON_TARGET(cond cond.y ${CMAKE_CURRENT_BINARY_DIR}/cond.tab.c COMPILE_FLAGS "-p cond_") 52BISON_TARGET(sql sql.y ${CMAKE_CURRENT_BINARY_DIR}/sql.tab.c COMPILE_FLAGS "-p sql_") 53 54list(APPEND PCH_SKIP_SOURCE 55 ${BISON_cond_OUTPUTS} 56 ${BISON_sql_OUTPUTS} 57 ${CMAKE_CURRENT_BINARY_DIR}/msiserver_i.c 58 ${CMAKE_CURRENT_BINARY_DIR}/msi_stubs.c) 59 60# cond.tab.c/sql.tab.c have been generated with relative file paths... 61set_source_files_properties(cond.tab.c sql.tab.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"") 62 63add_library(msi MODULE 64 ${SOURCE} 65 ${PCH_SKIP_SOURCE} 66 msi.rc 67 ${CMAKE_CURRENT_BINARY_DIR}/msi.def) 68 69if(MSVC) 70 # error C4133: 'function': incompatible types - from 'UINT *' to 'MSIINSTALLCONTEXT *' 71 remove_target_compile_option(msi "/we4133") 72 73 # error C4312: 'type cast': conversion from 'unsigned int' to 'HANDLE' of greater size 74 remove_target_compile_option(msi "/we4312") 75endif() 76 77add_idl_headers(msi_idlheader msiserver.idl) 78add_typelib(msiserver.idl) 79set_source_files_properties(msi.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/msiserver.tlb) 80set_module_type(msi win32dll) 81target_link_libraries(msi uuid ${PSEH_LIB} wine) 82add_dependencies(msi msi_idlheader) 83add_delay_importlibs(msi odbccp32 crypt32 wintrust) 84add_importlibs(msi advapi32 advapi32_vista cabinet comctl32 gdi32 ole32 oleaut32 shell32 shlwapi urlmon user32 version wininet mspatcha 85 #FIXME : should be in delayed imports 86 imagehlp 87 msvcrt 88 kernel32_vista 89 kernel32 90 ntdll) 91 92add_pch(msi precomp.h "${PCH_SKIP_SOURCE}") 93add_cd_file(TARGET msi DESTINATION reactos/system32 FOR all) 94