1 2if(MSVC) 3 if(MSVC_VERSION LESS 1900) 4 add_definitions( 5 -Dsnprintf=_snprintf 6 -Dstrtoull=_strtoui64 7 -Dstrtoll=_strtoi64) 8 9 # Add this definition for WDK only, VS 9 doesn't like that 10 if(DEFINED ENV{DDKBUILDENV}) 11 add_definitions(-Dvsnprintf=_vsnprintf) 12 endif() 13 endif() 14 15 # Disable warning " unary minus operator applied to unsigned type, result still unsigned" 16 add_compile_flags("/wd4146") 17 18 # Disable warning "'=': conversion from 'a' to 'b', possible loss of data" 19 add_compile_flags("/wd4244") 20 21endif() 22 23if(CMAKE_CROSSCOMPILING) 24 add_definitions( 25 -D_DLL -D__USE_CRTIMP 26 -D__NO_ISOCEXT 27 -Dstrtoull=_strtoui64 28 -Dstrtoll=_strtoi64 29 -Dopen=_open 30 -Dclose=_close) 31 32 include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) 33endif() 34 35list(APPEND SOURCE 36 preproc.c 37 wpp.c 38 ppl.yy.c 39 ppy.tab.c) 40 41if(CMAKE_CROSSCOMPILING) 42 add_library(wpp ${SOURCE}) 43else() 44 add_library(wpphost ${SOURCE}) 45endif() 46