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