[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905
[reactos.git] / drivers / usb / usbport / CMakeLists.txt
index 4598381..8af14de 100644 (file)
@@ -15,16 +15,18 @@ list(APPEND SOURCE
     trfsplit.c
     urb.c
     usb2.c
-    usbport.c
-    usbport.h)
+    usbport.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c)
 
 add_library(usbport MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     usbport.rc
     ${CMAKE_CURRENT_BINARY_DIR}/usbport.def)
 
-add_pch(usbport usbport.h SOURCE)
+add_pch(usbport usbport.h "${PCH_SKIP_SOURCE}")
 set_module_type(usbport kernelmodedriver)
 add_importlibs(usbport ntoskrnl hal)
 add_cd_file(TARGET usbport DESTINATION reactos/system32/drivers NO_CAB FOR all)