reactos/sdk/tools/wpp/CMakeLists.txt
Carl J. Bialorucki c9842e5aad
Move /sdk/include/reactos/wine to /sdk/include/wine, reorder global includes, remove unneeded includes (#8258)
- Move sdk\include\reactos\wine to sdk\include\wine
- Reorder the directories in include_directories() to be closer to alphabetical. This should make it easier to determine what global include directories can be removed in the future.
2025-07-29 13:57:12 -06:00

51 lines
1.4 KiB
CMake

add_definitions(
-D_CRT_DECLARE_NONSTDC_NAMES=1
-D_CRT_NONSTDC_NO_DEPRECATE
)
if(MSVC)
if(MSVC_VERSION LESS 1900)
add_definitions(
-Dsnprintf=_snprintf
-Dstrtoull=_strtoui64
-Dstrtoll=_strtoi64)
# Add this definition for WDK only, VS 9 doesn't like that
if(DEFINED ENV{DDKBUILDENV})
add_definitions(-Dvsnprintf=_vsnprintf)
endif()
endif()
# Disable warnings
add_compile_options(
/wd4146 # "unary minus operator applied to unsigned type, result still unsigned"
/wd4244) # "'=': conversion from 'a' to 'b', possible loss of data"
endif()
if(CMAKE_CROSSCOMPILING)
add_definitions(
-D_DLL -D__USE_CRTIMP
-D__NO_ISOCEXT
-Dstrtoull=_strtoui64
-Dstrtoll=_strtoi64
-Dopen=_open
-Dclose=_close)
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/wine)
endif()
FLEX_TARGET(pp_scanner ppl.l ${CMAKE_CURRENT_BINARY_DIR}/ppl.yy.c)
BISON_TARGET(pp_parser ppy.y ${CMAKE_CURRENT_BINARY_DIR}/ppy.tab.c COMPILE_FLAGS "-p ppy_")
ADD_FLEX_BISON_DEPENDENCY(pp_scanner pp_parser)
list(APPEND SOURCE
preproc.c
wpp.c)
if(CMAKE_CROSSCOMPILING)
add_library(wpp ${SOURCE} ${FLEX_pp_scanner_OUTPUT_SOURCE} ${BISON_pp_parser_OUTPUT_SOURCE})
else()
add_library(wpphost ${SOURCE} ${FLEX_pp_scanner_OUTPUTS} ${BISON_pp_parser_OUTPUTS})
target_link_libraries(wpphost PRIVATE host_includes)
endif()