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