CMakeLists.txt 411 B

12345678910111213
  1. cmake_minimum_required(VERSION 2.8)
  2. project(ws_server)
  3. set(THREADS_PREFER_PTHREAD_FLAG ON)
  4. find_package(Threads REQUIRED)
  5. set(SOURCES "main.cpp" "socket_listener.cpp")
  6. set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -std=c++17 -pthread")
  7. add_executable(${PROJECT_NAME} ${SOURCES})
  8. target_include_directories(${PROJECT_NAME} PRIVATE
  9. "headers"
  10. )
  11. target_link_libraries(${PROJECT_NAME} Threads::Threads)