[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905
[reactos.git] / dll / win32 / scrrun / CMakeLists.txt
index 7dbc453..ae3dd17 100644 (file)
@@ -8,9 +8,10 @@ add_typelib(scrrun.idl)
 list(APPEND SOURCE
     dictionary.c
     filesystem.c
-    scrrun.c
-    precomp.h
-    ${CMAKE_CURRENT_BINARY_DIR}/scrrun_stubs.c)
+    scrrun.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 list(APPEND scrrun_rc_deps
     ${CMAKE_CURRENT_SOURCE_DIR}/scrrun.rgs
@@ -21,13 +22,14 @@ set_source_files_properties(scrrun.rc PROPERTIES OBJECT_DEPENDS "${scrrun_rc_dep
 
 add_library(scrrun MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     scrrun.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/scrrun_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/scrrun.def)
 
 add_dependencies(scrrun scrrun_idlheader stdole2)
 set_module_type(scrrun win32dll)
 target_link_libraries(scrrun uuid wine)
 add_importlibs(scrrun oleaut32 version advapi32 msvcrt kernel32 ntdll)
-add_pch(scrrun precomp.h SOURCE)
+add_pch(scrrun precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET scrrun DESTINATION reactos/system32 FOR all)