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    target_compile_options(telnet PRIVATE /wd4838)
31endif()
32
33if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
34    target_compile_options(telnet PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-narrowing>)
35    if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
36        target_compile_options(telnet PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wno-restrict>)
37    endif()
38endif()
39
40set_module_type(telnet win32cui)
41add_importlibs(telnet ws2_32 user32 msvcrt kernel32 ntdll)
42add_pch(telnet precomp.h SOURCE)
43add_cd_file(TARGET telnet DESTINATION reactos/system32 FOR all)
44