[NTOBJSHEX] Improve the existing PCH and make use of it.
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 26 Nov 2017 12:26:39 +0000 (13:26 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 26 Nov 2017 12:26:39 +0000 (13:26 +0100)
dll/shellext/ntobjshex/CMakeLists.txt
dll/shellext/ntobjshex/ntobjfolder.cpp
dll/shellext/ntobjshex/precomp.h

index 840a3f4..9d2c76e 100644 (file)
@@ -17,12 +17,16 @@ spec2def(ntobjshex.dll ntobjshex.spec)
 file(GLOB_RECURSE ntobjshex_rc_deps resources/*.*)
 add_rc_deps(ntobjshex.rc ${ntobjshex_rc_deps})
 
-add_library(ntobjshex SHARED
+list(APPEND SOURCE
     ntobjenum.cpp
     ntobjfolder.cpp
     ntobjshex.cpp
-    ntobjshex.rc
     regfolder.cpp
+    precomp.h)
+
+add_library(ntobjshex SHARED
+    ${SOURCE}
+    ntobjshex.rc
     ${CMAKE_CURRENT_BINARY_DIR}/ntobjshex.def)
 
 set_module_type(ntobjshex win32dll UNICODE)
@@ -42,4 +46,5 @@ add_importlibs(ntobjshex
     kernel32
     ntdll)
 
+add_pch(ntobjshex precomp.h SOURCE)
 add_cd_file(TARGET ntobjshex DESTINATION reactos/system32 FOR all)
index 725ed78..24571ca 100644 (file)
@@ -8,6 +8,8 @@
 
 #include "precomp.h"
 
+#include <wine/unicode.h>
+
 // {845B0FB2-66E0-416B-8F91-314E23F7C12D}
 const GUID CLSID_NtObjectFolder = { 0x845b0fb2, 0x66e0, 0x416b, { 0x8f, 0x91, 0x31, 0x4e, 0x23, 0xf7, 0xc1, 0x2d } };
 
index f117b37..55a0557 100644 (file)
@@ -1,11 +1,11 @@
-#pragma once
+#ifndef _NTOBJSHEX_PRECOMP_H_
+#define _NTOBJSHEX_PRECOMP_H_
 
-#define WIN32_NO_STATUS
 #include <stdarg.h>
 #include <tchar.h>
 
-#define COBJMACROS
 #define WIN32_NO_STATUS
+#define COBJMACROS
 #define _INC_WINDOWS
 #define COM_NO_WINDOWS_H
 #define NTOS_MODE_USER
 #include <windef.h>
 #include <winbase.h>
 #include <winreg.h>
-#include <winuser.h>
-#include <wincon.h>
-#include <ddeml.h>
-#include <shlguid_undoc.h>
 #include <shlwapi.h>
 #include <shlobj.h>
-#include <shlobj_undoc.h>
-#include <shlwapi_undoc.h>
-#include <tchar.h>
 #include <strsafe.h>
 #include <atlbase.h>
 #include <atlcom.h>
-#include <atlwin.h>
 #include <undocshell.h>
 #include <shellutils.h>
 
-#include <shellapi.h>
-
 #include <wine/debug.h>
-#include <wine/unicode.h>
 
 #include "resource.h"
 
@@ -59,7 +48,6 @@ DEFINE_GUID(CLSID_NtObjectFolder,
 
 WINE_DEFAULT_DEBUG_CHANNEL(ntobjshex);
 
-#include <rtlfuncs.h>
 #include <ntquery.h>
 #include "util.h"
 
@@ -68,3 +56,5 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntobjshex);
 #include "foldercommon.h"
 #include "ntobjfolder.h"
 #include "regfolder.h"
+
+#endif /* _NTOBJSHEX_PRECOMP_H_ */