xref: /reactos/dll/win32/shell32/CMakeLists.txt (revision 8f9723ae)
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    CDefViewUtil.cpp
69    CDefViewDual.cpp
70    CDefViewBckgrndMenu.cpp
71    stubs.cpp
72    systray.cpp
73    CUserNotification.cpp
74    CDefaultContextMenu.cpp
75    COpenWithMenu.cpp
76    CNewMenu.cpp
77    CSendToMenu.cpp
78    CCopyMoveToMenu.cpp
79    CCopyAsPathMenu.cpp
80    CShellDispatch.cpp
81    CFolder.cpp
82    CFolderItems.cpp
83    CFolderItemVerbs.cpp)
84
85list(APPEND PCH_SKIP_SOURCE
86    wine/appbar.c
87    wine/classes.c
88    wine/clipboard.c
89    wine/control.c
90    wine/pidl.c
91    wine/shell32_main.c
92    wine/shellole.c
93    wine/shellord.c
94    wine/shellpath.c
95    wine/shellreg.c
96    wine/shellstring.c
97    wine/shlmenu.c
98    wine/shpolicy.c
99    vista.c
100    ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c)
101
102file(GLOB_RECURSE shell32_rc_deps res/*.*)
103list(APPEND shell32_rc_deps ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
104add_rc_deps(shell32.rc ${shell32_rc_deps})
105
106add_library(shell32 MODULE
107    ${SOURCE}
108    ${PCH_SKIP_SOURCE}
109    shell32.rc
110    ${CMAKE_CURRENT_BINARY_DIR}/shell32.def)
111
112if(MSVC)
113    # error C4311: 'type cast': pointer truncation from 'HANDLE' to 'INT'
114    remove_target_compile_option(shell32 "/we4311")
115endif()
116
117add_typelib(shell32_shldisp.idl)
118set_source_files_properties(shell32.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
119
120set_module_type(shell32 win32dll UNICODE)
121target_link_libraries(shell32 shellmenu shelldesktop wine uuid recyclebin cpprt atl_classes)
122add_delay_importlibs(shell32 powrprof shdocvw devmgr winspool.drv winmm mpr uxtheme ole32 oleaut32 userenv browseui version fmifs)
123add_importlibs(shell32 advapi32 gdi32 user32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll)
124add_dependencies(shell32 stdole2) # shell32_shldisp.tlb needs stdole2.tlb
125add_pch(shell32 precomp.h "${PCH_SKIP_SOURCE}")
126add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all)
127