Linking WinSock through CMAKE
add_executable(MySocketApp main.cpp) if(WIN32) target_link_libraries(MySocketApp ws2_32) endif(WIN32)