xref: /reactos/dll/win32/shell32/CMakeLists.txt (revision 32d615fc)
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    brfolder.cpp
22    CActiveDesktop.cpp
23    CActiveDesktop.h
24    CIDLDataObj.cpp
25    CQueryAssociations.cpp
26    changenotify.cpp
27    debughlp.cpp
28    dialogs/dialogs.cpp
29    dialogs/drive.cpp
30    dialogs/drvdefext.cpp
31    dialogs/filedefext.cpp
32    dialogs/filetypes.cpp
33    dialogs/folder_options.cpp
34    dialogs/fprop.cpp
35    dialogs/general.cpp
36    dialogs/recycler_prop.cpp
37    dialogs/view.cpp
38    CDropTargetHelper.cpp
39    CEnumIDListBase.cpp
40    CExtractIcon.cpp
41    folders.cpp
42    iconcache.cpp
43    shell32.cpp
44    utils.cpp
45    CShellItem.cpp
46    CShellLink.cpp
47    CFolderOptions.cpp
48    folders/CDesktopFolder.cpp
49    folders/CFSFolder.cpp
50    folders/CDrivesFolder.cpp
51    folders/CMyDocsFolder.cpp
52    folders/CPrinterFolder.cpp
53    folders/CAdminToolsFolder.cpp
54    folders/CNetFolder.cpp
55    folders/CFontsFolder.cpp
56    folders/CControlPanelFolder.cpp
57    folders/CRecycleBin.cpp
58    folders/CRegFolder.cpp
59    droptargets/CexeDropHandler.cpp
60    droptargets/CFSDropTarget.cpp
61    droptargets/CRecyclerDropTarget.cpp
62    shldataobject.cpp
63    shlexec.cpp
64    shlfileop.cpp
65    shlfolder.cpp
66    CFileSysBindData.cpp
67    CDefView.cpp
68    CDefViewDual.cpp
69    CDefViewBckgrndMenu.cpp
70    stubs.cpp
71    systray.cpp
72    CUserNotification.cpp
73    CDefaultContextMenu.cpp
74    COpenWithMenu.cpp
75    CNewMenu.cpp
76    CSendToMenu.cpp
77    CCopyMoveToMenu.cpp
78    CCopyAsPathMenu.cpp
79    CShellDispatch.cpp
80    CFolder.cpp
81    CFolderItems.cpp
82    CFolderItemVerbs.cpp)
83
84list(APPEND PCH_SKIP_SOURCE
85    wine/appbar.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