2019-02-21 03:59:07 +01:00
|
|
|
#
|
|
|
|
# Author: Benjamin Sergeant
|
|
|
|
# Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
|
|
|
|
#
|
|
|
|
|
|
|
|
cmake_minimum_required (VERSION 3.4.1)
|
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
|
|
|
|
2019-04-23 02:24:01 +02:00
|
|
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
|
|
|
|
# set(CMAKE_LD_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
|
2019-04-12 01:03:05 +02:00
|
|
|
|
2019-02-21 03:59:07 +01:00
|
|
|
set (CMAKE_CXX_STANDARD 14)
|
|
|
|
|
|
|
|
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-02-22 06:24:53 +01:00
|
|
|
include_directories(ws ../third_party)
|
2019-04-09 06:52:20 +02:00
|
|
|
include_directories(ws ../third_party/statsd-client-cpp/src)
|
2019-04-23 02:24:01 +02:00
|
|
|
include_directories(ws snake)
|
2019-02-21 03:59:07 +01:00
|
|
|
|
2019-02-22 06:24:53 +01:00
|
|
|
add_executable(ws
|
|
|
|
../third_party/msgpack11/msgpack11.cpp
|
2019-04-09 06:52:20 +02:00
|
|
|
../third_party/jsoncpp/jsoncpp.cpp
|
|
|
|
../third_party/statsd-client-cpp/src/statsd_client.cpp
|
2019-04-21 20:20:17 +02:00
|
|
|
|
2019-02-21 03:59:07 +01:00
|
|
|
ixcrypto/IXBase64.cpp
|
|
|
|
ixcrypto/IXHash.cpp
|
2019-02-22 06:24:53 +01:00
|
|
|
ixcrypto/IXUuid.cpp
|
2019-04-09 06:52:20 +02:00
|
|
|
ixcrypto/IXHMac.cpp
|
2019-02-22 06:24:53 +01:00
|
|
|
|
2019-04-21 20:20:17 +02:00
|
|
|
ixcobra/IXCobraConnection.cpp
|
|
|
|
ixcobra/IXCobraMetricsPublisher.cpp
|
|
|
|
ixcobra/IXCobraMetricsThreadedPublisher.cpp
|
|
|
|
|
2019-04-23 02:24:01 +02:00
|
|
|
snake/IXSnakeServer.cpp
|
|
|
|
snake/IXSnakeProtocol.cpp
|
|
|
|
snake/IXAppConfig.cpp
|
|
|
|
|
2019-03-20 22:29:02 +01:00
|
|
|
IXRedisClient.cpp
|
2019-04-12 01:03:05 +02:00
|
|
|
IXSentryClient.cpp
|
2019-03-20 22:29:02 +01:00
|
|
|
|
2019-03-01 06:54:03 +01:00
|
|
|
ws_http_client.cpp
|
2019-02-23 06:47:57 +01:00
|
|
|
ws_ping_pong.cpp
|
2019-02-23 06:13:56 +01:00
|
|
|
ws_broadcast_server.cpp
|
|
|
|
ws_echo_server.cpp
|
2019-02-23 05:49:26 +01:00
|
|
|
ws_chat.cpp
|
|
|
|
ws_connect.cpp
|
2019-02-22 06:24:53 +01:00
|
|
|
ws_transfer.cpp
|
|
|
|
ws_send.cpp
|
|
|
|
ws_receive.cpp
|
2019-03-20 22:29:02 +01:00
|
|
|
ws_redis_publish.cpp
|
|
|
|
ws_redis_subscribe.cpp
|
2019-04-09 06:52:20 +02:00
|
|
|
ws_cobra_subscribe.cpp
|
2019-04-21 20:16:33 +02:00
|
|
|
ws_cobra_publish.cpp
|
2019-04-09 06:52:20 +02:00
|
|
|
ws_cobra_to_statsd.cpp
|
2019-04-12 01:03:05 +02:00
|
|
|
ws_cobra_to_sentry.cpp
|
2019-04-23 02:24:01 +02:00
|
|
|
ws_snake.cpp
|
2019-02-22 06:24:53 +01:00
|
|
|
ws.cpp)
|
2019-02-21 03:59:07 +01:00
|
|
|
|
2019-02-22 06:24:53 +01:00
|
|
|
target_link_libraries(ws ixwebsocket)
|
2019-04-16 17:51:57 +02:00
|
|
|
|
|
|
|
if(NOT APPLE)
|
|
|
|
find_package(OpenSSL REQUIRED)
|
|
|
|
add_definitions(${OPENSSL_DEFINITIONS})
|
|
|
|
message(STATUS "OpenSSL: " ${OPENSSL_VERSION})
|
|
|
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
|
|
|
target_link_libraries(ws ${OPENSSL_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2019-02-22 07:05:30 +01:00
|
|
|
install(TARGETS ws RUNTIME DESTINATION bin)
|