[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905
[reactos.git] / dll / win32 / gdiplus / CMakeLists.txt
index 11fe7ee..a3ea0e3 100644 (file)
@@ -21,21 +21,23 @@ list(APPEND SOURCE
     pathiterator.c
     pen.c
     region.c
-    stringformat.c
-    precomp.h)
+    stringformat.c)
+
+list(APPEND PCH_SKIP_SOURCE
+    guid.c
+    ${CMAKE_CURRENT_BINARY_DIR}/gdiplus_stubs.c)
 
 add_library(gdiplus MODULE
     ${SOURCE}
-    guid.c
+    ${PCH_SKIP_SOURCE}
     gdiplus.rc
-    ${CMAKE_CURRENT_BINARY_DIR}/gdiplus_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/gdiplus.def)
 
 set_module_type(gdiplus win32dll)
 target_link_libraries(gdiplus wine)
 add_delay_importlibs(gdiplus windowscodecs)
 add_importlibs(gdiplus msvcrt shlwapi oleaut32 ole32 user32 gdi32 kernel32 ntdll)
-add_pch(gdiplus precomp.h SOURCE)
+add_pch(gdiplus precomp.h "${PCH_SKIP_SOURCE}")
 add_cd_file(TARGET gdiplus DESTINATION reactos/system32 FOR all)
 
 add_cd_file(TARGET gdiplus DESTINATION reactos/winsxs/x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.23038_none_deadbeef FOR all)
@@ -43,4 +45,3 @@ add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.gdiplus_6595b
 
 add_cd_file(TARGET gdiplus DESTINATION reactos/winsxs/x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.14393.0_none_deadbeef FOR all)
 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.14393.0_none_deadbeef.manifest DESTINATION reactos/winsxs/manifests FOR all)
-