1 2list(APPEND SOURCE 3 src/ansiprsr.cpp 4 src/keytrans.cpp 5 src/tcharmap.cpp 6 src/tconsole.cpp 7 src/tkeydef.cpp 8 src/tkeymap.cpp 9 src/tmapldr.cpp 10 src/tmouse.cpp 11 src/tnclass.cpp 12 src/tnclip.cpp 13 src/tncon.cpp 14 src/tnconfig.cpp 15 src/tnerror.cpp 16 src/tnetwork.cpp 17 src/tnmain.cpp 18 src/tnmisc.cpp 19 src/tscript.cpp 20 src/tscroll.cpp 21 src/ttelhndl.cpp 22 precomp.h) 23 24add_executable(telnet ${SOURCE} telnet.rc) 25target_link_libraries(telnet cppstl) 26set_target_cpp_properties(telnet WITH_EXCEPTIONS) 27 28if (MSVC) 29 # C4838: conversion from 'int' to 'SHORT' requires a narrowing conversion 30 # C4996: 'strnicmp': Deprecated POSIX name, Try _strnicmp instead! 31 target_compile_options(telnet PRIVATE /wd4838 /wd4996) 32endif() 33 34if (NOT MSVC) 35 target_compile_definitions(telnet PRIVATE _CRT_NONSTDC_NO_DEPRECATE) 36endif() 37 38if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") 39 target_compile_options(telnet PRIVATE -Wno-restrict $<$<COMPILE_LANGUAGE:CXX>:-Wno-narrowing>) 40endif() 41 42set_module_type(telnet win32cui) 43add_importlibs(telnet ws2_32 user32 msvcrt kernel32 ntdll) 44add_pch(telnet precomp.h SOURCE) 45add_cd_file(TARGET telnet DESTINATION reactos/system32 FOR all) 46