[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905

This commit is contained in:
Amine Khaldi
2020-05-09 22:37:40 +01:00
committed by Victor Perevertkin
parent 4cd7b3a3df
commit 139a3d6661
123 changed files with 874 additions and 644 deletions

View File

@@ -13,8 +13,10 @@ list(APPEND SOURCE
vbdisp.c
vbregexp.c
vbscript.c
vbscript_main.c
precomp.h)
vbscript_main.c)
list(APPEND PCH_SKIP_SOURCE
parser.tab.c)
# parser.tab.c has been generated with relative file paths...
set_source_files_properties(parser.tab.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
@@ -34,7 +36,7 @@ add_typelib(vbsglobal.idl vbsregexp10.idl vbsregexp55.idl)
add_library(vbscript MODULE
${SOURCE}
parser.tab.c
${PCH_SKIP_SOURCE}
vbscript.rc
${CMAKE_CURRENT_BINARY_DIR}/vbscript.def)
@@ -42,5 +44,5 @@ set_module_type(vbscript win32dll)
target_link_libraries(vbscript uuid wine)
add_importlibs(vbscript oleaut32 ole32 user32 msvcrt kernel32 ntdll)
add_dependencies(vbscript vbscript_idlheader stdole2)
add_pch(vbscript precomp.h SOURCE)
add_pch(vbscript precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET vbscript DESTINATION reactos/system32 FOR all)