[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
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
123 changed files with 874 additions and 644 deletions

View file

@ -11,16 +11,24 @@ list(APPEND SOURCE
callback.c
hlpfile.c
macro.c
winhelp.c
precomp.h)
winhelp.c)
list(APPEND PCH_SKIP_SOURCE
macro.lex.yy.c
string.c)
# macro.lex.yy.c has been generated with relative file paths...
set_source_files_properties(macro.lex.yy.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
add_rc_deps(rsrc.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/winhelp.ico)
add_executable(winhlp32 ${SOURCE} macro.lex.yy.c string.c rsrc.rc)
add_executable(winhlp32
${SOURCE}
${PCH_SKIP_SOURCE}
rsrc.rc)
set_module_type(winhlp32 win32gui)
target_link_libraries(winhlp32 wine)
add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll)
add_pch(winhlp32 precomp.h SOURCE)
add_pch(winhlp32 precomp.h "${PCH_SKIP_SOURCE}")
add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all)