2011-05-16 13:12:07 +00:00
|
|
|
|
2012-08-01 23:25:06 +00:00
|
|
|
if(MSVC)
|
2015-04-30 21:48:26 +00:00
|
|
|
if(MSVC_VERSION LESS 1900)
|
|
|
|
add_definitions(
|
|
|
|
-Dsnprintf=_snprintf
|
|
|
|
-Dstrtoull=_strtoui64
|
|
|
|
-Dstrtoll=_strtoi64)
|
2012-09-15 15:59:06 +00:00
|
|
|
|
2015-04-30 21:48:26 +00:00
|
|
|
# Add this definition for WDK only, VS 9 doesn't like that
|
|
|
|
if(DEFINED ENV{DDKBUILDENV})
|
|
|
|
add_definitions(-Dvsnprintf=_vsnprintf)
|
|
|
|
endif()
|
2012-09-15 15:59:06 +00:00
|
|
|
endif()
|
2019-04-15 11:29:33 +00:00
|
|
|
|
|
|
|
# Disable warning " unary minus operator applied to unsigned type, result still unsigned"
|
|
|
|
add_compile_flags("/wd4146")
|
|
|
|
|
|
|
|
# Disable warning "'=': conversion from 'a' to 'b', possible loss of data"
|
|
|
|
add_compile_flags("/wd4244")
|
|
|
|
|
2012-08-01 23:25:06 +00:00
|
|
|
endif()
|
|
|
|
|
2013-09-14 10:30:44 +00:00
|
|
|
if(CMAKE_CROSSCOMPILING)
|
|
|
|
add_definitions(
|
|
|
|
-D_DLL -D__USE_CRTIMP
|
|
|
|
-D__NO_ISOCEXT
|
|
|
|
-Dstrtoull=_strtoui64
|
|
|
|
-Dstrtoll=_strtoi64
|
|
|
|
-Dopen=_open
|
|
|
|
-Dclose=_close)
|
2016-04-20 12:36:25 +00:00
|
|
|
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
|
2013-09-14 10:30:44 +00:00
|
|
|
endif()
|
|
|
|
|
2011-05-16 13:12:07 +00:00
|
|
|
list(APPEND SOURCE
|
|
|
|
preproc.c
|
|
|
|
wpp.c
|
2013-09-14 09:02:13 +00:00
|
|
|
ppl.yy.c
|
2011-05-16 13:12:07 +00:00
|
|
|
ppy.tab.c)
|
|
|
|
|
2013-09-14 10:30:44 +00:00
|
|
|
if(CMAKE_CROSSCOMPILING)
|
|
|
|
add_library(wpp ${SOURCE})
|
|
|
|
else()
|
|
|
|
add_library(wpphost ${SOURCE})
|
2019-11-15 13:07:46 +00:00
|
|
|
target_link_libraries(wpphost PRIVATE host_includes)
|
2013-09-14 10:30:44 +00:00
|
|
|
endif()
|