[CMAKE]
[reactos.git] / reactos / tools / wpp / CMakeLists.txt
1
2 if(MSVC)
3 add_definitions(
4 -Dsnprintf=_snprintf
5 -Dstrtoull=_strtoui64
6 -Dstrtoll=_strtoi64)
7
8 # Add this definition for WDK only, VS 9 doesn't like that
9 if (DEFINED ENV{DDKBUILDENV})
10 add_definitions(
11 -Dvsnprintf=_vsnprintf)
12 endif()
13 endif()
14
15 if(CMAKE_CROSSCOMPILING)
16 add_definitions(
17 -D_DLL -D__USE_CRTIMP
18 -D__NO_ISOCEXT
19 -Dstrtoull=_strtoui64
20 -Dstrtoll=_strtoi64
21 -Dopen=_open
22 -Dclose=_close)
23
24 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
25 endif()
26
27 list(APPEND SOURCE
28 preproc.c
29 wpp.c
30 ppl.yy.c
31 ppy.tab.c)
32
33 if(CMAKE_CROSSCOMPILING)
34 add_library(wpp ${SOURCE})
35 else()
36 add_library(wpphost ${SOURCE})
37 endif()