8bdf3ee56fff61917ffc2b69f2645e6ac960ef2b
[reactos.git] / dll / win32 / shell32 / CMakeLists.txt
1 PROJECT(SHELL)
2
3 add_subdirectory(shelldesktop)
4 add_subdirectory(shellmenu)
5 add_subdirectory(shellrecyclebin)
6
7 set_cpp(WITH_RUNTIME)
8 spec2def(shell32.dll shell32.spec ADD_IMPORTLIB)
9
10 if(NOT MSVC)
11 # HACK: this should be enabled globally!
12 add_compile_flags_language("-std=c++11" "CXX")
13 endif()
14
15 remove_definitions(-D_WIN32_WINNT=0x502)
16 add_definitions(-D_WIN32_WINNT=0x600)
17
18 add_definitions(
19 -D_SHELL32_
20 -D_WINE
21 -D_ATL_NO_EXCEPTIONS)
22
23 include_directories(
24 ${REACTOS_SOURCE_DIR}/sdk/lib/atl
25 ${REACTOS_SOURCE_DIR})
26
27 list(APPEND SOURCE
28 CIDLDataObj.cpp
29 CQueryAssociations.cpp
30 debughlp.cpp
31 dialogs/dialogs.cpp
32 dialogs/drive.cpp
33 dialogs/drvdefext.cpp
34 dialogs/folder_options.cpp
35 dialogs/filedefext.cpp
36 dialogs/fprop.cpp
37 dialogs/recycler_prop.cpp
38 CDropTargetHelper.cpp
39 CEnumIDListBase.cpp
40 CExtractIcon.cpp
41 folders.cpp
42 iconcache.cpp
43 shell32.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 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 CDefaultContextMenu.cpp
71 COpenWithMenu.cpp
72 CNewMenu.cpp
73 CShellDispatch.cpp
74 CFolder.cpp
75 CFolderItems.cpp
76 CFolderItemVerbs.cpp
77 precomp.h)
78
79 file(GLOB_RECURSE shell32_rc_deps res/*.*)
80 list(APPEND shell32_rc_deps ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
81 add_rc_deps(shell32.rc ${shell32_rc_deps})
82
83 add_library(shell32 SHARED
84 ${SOURCE}
85 wine/brsfolder.c
86 wine/changenotify.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 shell32.rc
101 ${CMAKE_CURRENT_BINARY_DIR}/shell32_stubs.c
102 ${CMAKE_CURRENT_BINARY_DIR}/shell32.def)
103
104
105 add_typelib(shell32_shldisp.idl)
106 set_source_files_properties(shell32.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/shell32_shldisp.tlb)
107
108 set_module_type(shell32 win32dll UNICODE)
109 target_link_libraries(shell32 shellmenu shelldesktop atlnew wine uuid recyclebin)
110 add_delay_importlibs(shell32 powrprof shdocvw devmgr winspool.drv winmm mpr uxtheme ole32 oleaut32 userenv browseui version fmifs)
111 add_importlibs(shell32 advapi32 gdi32 user32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll)
112 add_dependencies(shell32 stdole2) # shell32_shldisp.tlb needs stdole2.tlb
113 add_pch(shell32 precomp.h SOURCE)
114 add_cd_file(TARGET shell32 DESTINATION reactos/system32 FOR all)