cmake_minimum_required(VERSION 3.16)

project(tsc LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)

if (MSVC)
    add_compile_options(/source-charset:utf-8)
endif()

add_executable(tsc main.cpp client.h client.cpp config.h config.cpp)
target_link_libraries(tsc PRIVATE trans_net trans_util filecomplete)
if (UNIX)
target_link_libraries(tsc PRIVATE pthread)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Windows")
    target_link_libraries(tsc PRIVATE ws2_32 wsock32)
endif()