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