[BROWSEUI] Enable the Disconnect Network Drive menu item. (#1522)
[reactos.git] / dll / win32 / browseui / CMakeLists.txt
index 563920f..8b97950 100644 (file)
@@ -1,74 +1,66 @@
+PROJECT(SHELL)
 
-set_cpp()
+add_subdirectory(shellbars)
 
-add_definitions(
-    -D__WINESRC__
-    -DROS_Headers)
-
-if (MSVC)
-    add_compile_flags("/EHa-")
-endif()
-
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
+set_cpp(WITH_RUNTIME)
 
-include_directories(${REACTOS_SOURCE_DIR}/lib/atl)
+add_definitions(
+    -D_ATL_NO_EXCEPTIONS)
 
+include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl)
 spec2def(browseui.dll browseui.spec ADD_IMPORTLIB)
 
 list(APPEND SOURCE
+    ACLCustomMRU.cpp
+    ACLCustomMRU.h
+    aclistisf.cpp
     aclmulti.cpp
     addressband.cpp
     addresseditbox.cpp
     bandproxy.cpp
-    bandsite.cpp
-    bandsitemenu.cpp
-    basebar.cpp
     basebarsite.cpp
     brandband.cpp
     browseui.cpp
     browseuiord.cpp
+    CAutoComplete.cpp
+    CTaskbarList.cpp
+    CTaskbarList.h
     commonbrowser.cpp
+    desktopipc.cpp
+    explorerband.cpp
     globalfoldersettings.cpp
     internettoolbar.cpp
+    parsecmdline.cpp
     regtreeoptions.cpp
     shellbrowser.cpp
     toolsband.cpp
     travellog.cpp
     utility.cpp
+    CProgressDialog.cpp
+    precomp.h)
+
+add_library(browseui MODULE
+    ${SOURCE}
     dllinstall.c
+    browseui.rc
     ${CMAKE_CURRENT_BINARY_DIR}/browseui.def)
 
-add_library(browseui SHARED
-    ${SOURCE}
-    browseui.rc)
+set_module_type(browseui win32dll UNICODE)
+target_link_libraries(browseui shellbars uuid wine)
+add_importlibs(browseui uxtheme shlwapi shell32 comctl32 gdi32 ole32 oleaut32 user32 advapi32 mpr msvcrt kernel32 ntdll)
+add_pch(browseui precomp.h SOURCE)
+add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
 
 if(NOT MSVC)
-    # FIXME: http://www.cmake.org/Bug/view.php?id=12998
-    #allow_warnings(browseui)
-    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error")
+    add_target_compile_flags(browseui "-Wno-unused-but-set-variable")
+    # Binutils linker bug
+    if(LTCG)
+        add_target_link_flags(browseui "-Wl,--allow-multiple-definition")
+    endif()
 endif()
 
-set_module_type(browseui win32dll UNICODE)
-
-target_link_libraries(browseui
-    atlnew
-    uuid
-    wine)
-
-add_importlibs(browseui
-    shlwapi
-    shell32
-    comctl32
-    gdi32
-    ole32
-    oleaut32
-    user32
-    advapi32
-    msvcrt
-    kernel32
-    ntdll)
-
-add_pch(browseui precomp.h)
-add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
-
+add_custom_command(TARGET browseui POST_BUILD 
+  COMMAND "${CMAKE_COMMAND}" -E copy 
+     "$<TARGET_FILE:browseui>"
+     "$<TARGET_FILE_DIR:filebrowser>/$<TARGET_FILE_NAME:browseui>" 
+  COMMENT "Copying to output directory")