xref: /reactos/dll/win32/msi/CMakeLists.txt (revision 019f21ee)
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
10if(MSVC)
11    #  error C4133: 'function': incompatible types - from 'UINT *' to 'MSIINSTALLCONTEXT *'
12    replace_compile_flags("/we4133" " ")
13
14    # error C4312: 'type cast': conversion from 'unsigned int' to 'HANDLE' of greater size
15    replace_compile_flags("/we4312" " ")
16endif()
17
18list(APPEND SOURCE
19    action.c
20    alter.c
21    appsearch.c
22    assembly.c
23    automation.c
24    classes.c
25    create.c
26    custom.c
27    database.c
28    delete.c
29    dialog.c
30    distinct.c
31    drop.c
32    files.c
33    font.c
34    format.c
35    handle.c
36    insert.c
37    install.c
38    media.c
39    msi.c
40    msi_main.c
41    msiquery.c
42    package.c
43    patch.c
44    record.c
45    registry.c
46    script.c
47    select.c
48    source.c
49    storages.c
50    streams.c
51    string.c
52    suminfo.c
53    table.c
54    tokenize.c
55    update.c
56    upgrade.c
57    where.c
58    precomp.h)
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    cond.tab.c
66    sql.tab.c
67    ${CMAKE_CURRENT_BINARY_DIR}/msiserver_i.c
68    ${CMAKE_CURRENT_BINARY_DIR}/msi_stubs.c
69    msi.rc
70    ${CMAKE_CURRENT_BINARY_DIR}/msi.def)
71
72add_idl_headers(msi_idlheader msiserver.idl)
73add_typelib(msiserver.idl)
74set_source_files_properties(msi.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/msiserver.tlb)
75set_module_type(msi win32dll)
76target_link_libraries(msi uuid ${PSEH_LIB} wine)
77add_dependencies(msi msi_idlheader)
78add_delay_importlibs(msi odbccp32 crypt32 wintrust)
79add_importlibs(msi advapi32 advapi32_vista cabinet comctl32 gdi32 ole32 oleaut32 shell32 shlwapi urlmon user32 version wininet mspatcha
80    #FIXME : should be in delayed imports
81    imagehlp
82    msvcrt
83    kernel32_vista
84    kernel32
85    ntdll)
86
87add_pch(msi precomp.h SOURCE)
88add_cd_file(TARGET msi DESTINATION reactos/system32 FOR all)
89