2018-10-09 00:23:01 +02:00
|
|
|
#
|
|
|
|
# Author: Benjamin Sergeant
|
|
|
|
# Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
|
|
|
|
#
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.4.1)
|
|
|
|
project(ixwebsocket C CXX)
|
|
|
|
|
|
|
|
set (CMAKE_CXX_STANDARD 11)
|
|
|
|
set (CXX_STANDARD_REQUIRED ON)
|
|
|
|
set (CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
|
|
|
|
set( IXWEBSOCKET_SOURCES
|
2018-11-02 01:02:49 +01:00
|
|
|
ixwebsocket/IXEventFd.cpp
|
2018-10-09 00:23:01 +02:00
|
|
|
ixwebsocket/IXSocket.cpp
|
|
|
|
ixwebsocket/IXWebSocket.cpp
|
|
|
|
ixwebsocket/IXWebSocketTransport.cpp
|
2018-11-07 21:26:32 +01:00
|
|
|
ixwebsocket/IXWebSocketPerMessageDeflate.cpp
|
2018-11-10 03:23:49 +01:00
|
|
|
ixwebsocket/IXWebSocketPerMessageDeflateOptions.cpp
|
2018-10-09 00:23:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set( IXWEBSOCKET_HEADERS
|
2018-11-02 01:02:49 +01:00
|
|
|
ixwebsocket/IXEventFd.h
|
2018-10-09 00:23:01 +02:00
|
|
|
ixwebsocket/IXSocket.h
|
|
|
|
ixwebsocket/IXWebSocket.h
|
|
|
|
ixwebsocket/IXWebSocketTransport.h
|
2018-11-07 21:26:32 +01:00
|
|
|
ixwebsocket/IXWebSocketPerMessageDeflate.h
|
2018-11-10 03:23:49 +01:00
|
|
|
ixwebsocket/IXWebSocketPerMessageDeflateOptions.h
|
|
|
|
ixwebsocket/IXWebSocketHttpHeaders.h
|
2018-10-09 00:23:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
if (USE_TLS)
|
|
|
|
add_definitions(-DIXWEBSOCKET_USE_TLS)
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
list( APPEND IXWEBSOCKET_HEADERS ixwebsocket/IXSocketAppleSSL.h)
|
|
|
|
list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/IXSocketAppleSSL.cpp)
|
|
|
|
else()
|
|
|
|
list( APPEND IXWEBSOCKET_HEADERS ixwebsocket/IXSocketOpenSSL.h)
|
|
|
|
list( APPEND IXWEBSOCKET_SOURCES ixwebsocket/IXSocketOpenSSL.cpp)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library( ixwebsocket STATIC
|
|
|
|
${IXWEBSOCKET_SOURCES}
|
|
|
|
${IXWEBSOCKET_HEADERS}
|
|
|
|
)
|
|
|
|
|
2018-11-07 21:26:32 +01:00
|
|
|
target_link_libraries(ixwebsocket "z")
|
|
|
|
|
2018-10-09 00:23:01 +02:00
|
|
|
set( IXWEBSOCKET_INCLUDE_DIRS
|
|
|
|
.
|
|
|
|
../../shared/OpenSSL/include)
|
|
|
|
target_include_directories( ixwebsocket PUBLIC ${IXWEBSOCKET_INCLUDE_DIRS} )
|