xref: /reactos/dll/win32/shell32/CMakeLists.txt (revision 53221834)
1PROJECT(SHELL)
2
3add_subdirectory(shelldesktop)
4add_subdirectory(shellmenu)
5add_subdirectory(shellrecyclebin)
6
7spec2def(shell32.dll shell32.spec ADD_IMPORTLIB)
8
9remove_definitions(-D_WIN32_WINNT=0x502)
10add_definitions(-D_WIN32_WINNT=0x600)
11
12add_definitions(
13    -D_SHELL32_
14    -D_WINE)
15
16list(APPEND SOURCE
17    CActiveDesktop.cpp
18    CActiveDesktop.h
19    CIDLDataObj.cpp
20    CQueryAssociations.cpp
21    changenotify.cpp
22    debughlp.cpp
23    dialogs/dialogs.cpp
24    dialogs/drive.cpp
25    dialogs/drvdefext.cpp
26    dialogs/filedefext.cpp
27    dialogs/filetypes.cpp
28    dialogs/folder_options.cpp
29    dialogs/fprop.cpp
30    dialogs/general.cpp
31    dialogs/recycler_prop.cpp
32    dialogs/view.cpp
33    CDropTargetHelper.cpp
34    CEnumIDListBase.cpp
35    CExtractIcon.cpp
36    folders.cpp
37    iconcache.cpp
38    shell32.cpp
39    CShellItem.cpp
40    CShellLink.cpp
41    CFolderOptions.cpp
42    folders/CDesktopFolder.cpp
43    folders/CFSFolder.cpp
44    folders/CDrivesFolder.cpp
45    folders/CMyDocsFolder.cpp
46    folders/CPrinterFolder.cpp
47    folders/CAdminToolsFolder.cpp
48    folders/CNetFolder.cpp
49    folders/CFontsFolder.cpp
50    folders/CControlPanelFolder.cpp
51    folders/CRecycleBin.cpp
52    folders/CRegFolder.cpp
53    droptargets/CexeDropHandler.cpp
54    droptargets/CFSDropTarget.cpp
55    droptargets/CRecyclerDropTarget.cpp
56    shlexec.cpp
57    shlfileop.cpp
58    shlfolder.cpp
59    CFileSysBindData.cpp
60    CDefView.cpp
61    CDefViewDual.cpp
62    CDefViewBckgrndMenu.cpp
63    stubs.cpp
64    systray.cpp
65    CUserNotification.cpp
66    CDefaultContextMenu.cpp
67    COpenWithMenu.cpp
68    CNewMenu.cpp
69    CSendToMenu.cpp
70    CCopyToMenu.cpp
71    CMoveToMenu.cpp
72    CShellDispatch.cpp
73    CFolder.cpp
74    CFolderItems.cpp
75    CFolderItemVerbs.cpp)
76
77list(APPEND PCH_SKIP_SOURCE
78    wine/appbar.c
79    wine/brsfolder.c
80    wine/classes.c
81    wine/clipboard.c
82    wine/control.c
83    wine/pidl.c
84    wine/shell32_main.c
85    wine/shellole.c
86    wine/shellord.c
87    wine/shellpath.c
88    wine/shellreg.c
89    wine/shellstring.c
90    wine/shlmenu.c
91    wine/shpolicy.c
92    vista.c
93    ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c)
94
95file(GLOB_RECURSE shell32_rc_deps res/*.*)
96list(APPEND shell32_rc_deps ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
97add_rc_deps(shell32.rc ${shell32_rc_deps})
98
99add_library(shell32 MODULE
100    ${SOURCE}
101    ${PCH_SKIP_SOURCE}
102    shell32.rc
103    ${CMAKE_CURRENT_BINARY_DIR}/shell32.def)
104
105if(MSVC)
106    # error C4311: 'type cast': pointer truncation from 'HANDLE' to 'INT'
107    remove_target_compile_option(shell32 "/we4311")
108endif()
109
110add_typelib(shell32_shldisp.idl)
111set_source_files_properties(shell32.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
112
113set_module_type(shell32 win32dll UNICODE)
114target_link_libraries(shell32 shellmenu shelldesktop wine uuid recyclebin cpprt atl_classes)
115add_delay_importlibs(shell32 powrprof shdocvw devmgr winspool.drv winmm mpr uxtheme ole32 oleaut32 userenv browseui version fmifs)
116add_importlibs(shell32 advapi32 gdi32 user32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll)
117add_dependencies(shell32 stdole2) # shell32_shldisp.tlb needs stdole2.tlb
118add_pch(shell32 precomp.h "${PCH_SKIP_SOURCE}")
119add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all)
120