2019-02-21 03:59:07 +01:00
|
|
|
#
|
|
|
|
# Author: Benjamin Sergeant
|
|
|
|
# Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
|
|
|
|
#
|
|
|
|
|
2020-09-26 22:51:19 +02:00
|
|
|
cmake_minimum_required (VERSION 3.14)
|
2019-02-22 06:24:53 +01:00
|
|
|
project (ws)
|
2019-02-21 03:59:07 +01:00
|
|
|
|
|
|
|
# There's -Weverything too for clang
|
2019-04-16 17:51:57 +02:00
|
|
|
if (NOT WIN32)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
|
|
|
|
endif()
|
2019-02-21 03:59:07 +01:00
|
|
|
|
2020-11-16 06:08:45 +01:00
|
|
|
set (CMAKE_CXX_STANDARD 11)
|
2019-02-21 03:59:07 +01:00
|
|
|
|
|
|
|
option(USE_TLS "Add TLS support" ON)
|
|
|
|
|
2019-02-22 06:24:53 +01:00
|
|
|
include_directories(ws .)
|
2019-02-23 05:49:26 +01:00
|
|
|
include_directories(ws ..)
|
2019-07-25 20:54:50 +02:00
|
|
|
include_directories(ws ../third_party/cpp-linenoise)
|
2020-12-26 00:17:46 +01:00
|
|
|
include_directories(ws ../third_party/cli11)
|
|
|
|
include_directories(ws ../third_party/msgpack11)
|
2019-02-21 03:59:07 +01:00
|
|
|
|
2020-12-26 00:17:46 +01:00
|
|
|
include(FetchContent)
|
2020-06-25 08:21:19 +02:00
|
|
|
|
2020-03-22 03:31:38 +01:00
|
|
|
add_executable(ws
|
2019-02-22 06:24:53 +01:00
|
|
|
../third_party/msgpack11/msgpack11.cpp
|
2020-06-12 03:01:45 +02:00
|
|
|
../third_party/cpp-linenoise/linenoise.cpp
|
2019-02-22 06:24:53 +01:00
|
|
|
ws.cpp)
|
2019-02-21 03:59:07 +01:00
|
|
|
|
2020-03-23 05:57:58 +01:00
|
|
|
# library with the most dependencies come first
|
2019-02-22 06:24:53 +01:00
|
|
|
target_link_libraries(ws ixwebsocket)
|
2019-09-23 21:30:46 +02:00
|
|
|
target_link_libraries(ws ixcrypto)
|
|
|
|
target_link_libraries(ws ixcore)
|
2019-04-16 17:51:57 +02:00
|
|
|
|
2019-12-25 18:03:57 +01:00
|
|
|
target_link_libraries(ws spdlog)
|
2020-09-30 23:24:04 +02:00
|
|
|
|
2019-02-22 07:05:30 +01:00
|
|
|
install(TARGETS ws RUNTIME DESTINATION bin)
|