cmake_minimum_required(VERSION 3.15)
project(xmail)

set(CMAKE_CXX_STANDARD 11)

# Windows Server 2008 (Windows Vista) Ÿ 
add_definitions(-D_WIN32_WINNT=0x0600)
add_definitions(-DWINVER=0x0600)

# Static linking CRT Ӽ 
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

# Ǵ vcpkg Ÿ
# set(VCPKG_TARGET_TRIPLET x86-windows-static)

# C++ ǥ  (C++11 Server 2008 )
set(CMAKE_CXX_STANDARD 11)

# ҽ  ߰
file(GLOB SOURCES "*.cpp" "*.c")
add_executable(xmail ${SOURCES})

#  ŷ
set_property(TARGET xmail PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

target_link_libraries(xmail
    ws2_32
    advapi32
    # ... Ÿ ʿ ̺귯
)
