[CMAKE] Implement PCH builds with target_precompile_headers. CORE-16905
[reactos.git] / base / applications / winhlp32 / CMakeLists.txt
1
2 include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
3
4 add_definitions(
5 -D__WINESRC__
6 -D__ROS_LONG64__
7 -Dfileno=_fileno
8 -Disatty=_isatty)
9
10 list(APPEND SOURCE
11 callback.c
12 hlpfile.c
13 macro.c
14 winhelp.c)
15
16 list(APPEND PCH_SKIP_SOURCE
17 macro.lex.yy.c
18 string.c)
19
20 # macro.lex.yy.c has been generated with relative file paths...
21 set_source_files_properties(macro.lex.yy.c PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
22
23 add_rc_deps(rsrc.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/winhelp.ico)
24
25 add_executable(winhlp32
26 ${SOURCE}
27 ${PCH_SKIP_SOURCE}
28 rsrc.rc)
29
30 set_module_type(winhlp32 win32gui)
31 target_link_libraries(winhlp32 wine)
32 add_importlibs(winhlp32 user32 gdi32 shell32 comctl32 comdlg32 msvcrt kernel32 ntdll)
33 add_pch(winhlp32 precomp.h "${PCH_SKIP_SOURCE}")
34 add_cd_file(TARGET winhlp32 DESTINATION reactos FOR all)