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