Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c2d23b255 |
@@ -153,6 +153,8 @@ add_library( ixwebsocket STATIC
|
|||||||
${IXWEBSOCKET_HEADERS}
|
${IXWEBSOCKET_HEADERS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_library ( ixwebsocket::ixwebsocket ALIAS ixwebsocket )
|
||||||
|
|
||||||
if (USE_TLS)
|
if (USE_TLS)
|
||||||
target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_TLS)
|
target_compile_definitions(ixwebsocket PUBLIC IXWEBSOCKET_USE_TLS)
|
||||||
if (USE_MBED_TLS)
|
if (USE_MBED_TLS)
|
||||||
@@ -182,22 +184,20 @@ if (USE_TLS)
|
|||||||
|
|
||||||
# This OPENSSL_FOUND check is to help find a cmake manually configured OpenSSL
|
# This OPENSSL_FOUND check is to help find a cmake manually configured OpenSSL
|
||||||
if (NOT OPENSSL_FOUND)
|
if (NOT OPENSSL_FOUND)
|
||||||
find_package(OpenSSL REQUIRED)
|
include(FindOpenSSL)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "OpenSSL: " ${OPENSSL_VERSION})
|
message(STATUS "OpenSSL: " ${OPENSSL_VERSION})
|
||||||
|
|
||||||
add_definitions(${OPENSSL_DEFINITIONS})
|
target_link_libraries(ixwebsocket PUBLIC OpenSSL::SSL OpenSSL::Crypto)
|
||||||
target_include_directories(ixwebsocket PUBLIC ${OPENSSL_INCLUDE_DIR})
|
|
||||||
target_link_libraries(ixwebsocket ${OPENSSL_LIBRARIES})
|
|
||||||
elseif (USE_MBED_TLS)
|
elseif (USE_MBED_TLS)
|
||||||
message(STATUS "TLS configured to use mbedtls")
|
message(STATUS "TLS configured to use mbedtls")
|
||||||
|
|
||||||
find_package(MbedTLS REQUIRED)
|
find_package(MbedTLS REQUIRED)
|
||||||
target_include_directories(ixwebsocket PUBLIC ${MBEDTLS_INCLUDE_DIRS})
|
target_include_directories(ixwebsocket PUBLIC ${MBEDTLS_INCLUDE_DIRS})
|
||||||
target_link_libraries(ixwebsocket ${MBEDTLS_LIBRARIES})
|
target_link_libraries(ixwebsocket PUBLIC ${MBEDTLS_LIBRARIES})
|
||||||
elseif (USE_SECURE_TRANSPORT)
|
elseif (USE_SECURE_TRANSPORT)
|
||||||
message(STATUS "TLS configured to use secure transport")
|
message(STATUS "TLS configured to use secure transport")
|
||||||
target_link_libraries(ixwebsocket "-framework foundation" "-framework security")
|
target_link_libraries(ixwebsocket PUBLIC "-framework foundation" "-framework security")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -207,25 +207,25 @@ if (NOT ZLIB_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
if (ZLIB_FOUND)
|
if (ZLIB_FOUND)
|
||||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||||
target_link_libraries(ixwebsocket ${ZLIB_LIBRARIES})
|
target_link_libraries(ixwebsocket PUBLIC ${ZLIB_LIBRARIES})
|
||||||
else()
|
else()
|
||||||
include_directories(third_party/zlib ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib)
|
include_directories(third_party/zlib ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib)
|
||||||
add_subdirectory(third_party/zlib)
|
add_subdirectory(third_party/zlib EXCLUDE_FROM_ALL)
|
||||||
target_link_libraries(ixwebsocket zlibstatic)
|
target_link_libraries(ixwebsocket PRIVATE $<LINK_ONLY:zlibstatic>)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(ixwebsocket wsock32 ws2_32 shlwapi)
|
target_link_libraries(ixwebsocket PUBLIC wsock32 ws2_32 shlwapi)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
|
||||||
if (USE_TLS)
|
if (USE_TLS)
|
||||||
target_link_libraries(ixwebsocket Crypt32)
|
target_link_libraries(ixwebsocket PUBLIC Crypt32)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
target_link_libraries(ixwebsocket ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(ixwebsocket PUBLIC ${CMAKE_THREAD_LIBS_INIT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@@ -238,15 +238,18 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
|||||||
target_compile_options(ixwebsocket PRIVATE /MP)
|
target_compile_options(ixwebsocket PRIVATE /MP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(ixwebsocket PUBLIC ${IXWEBSOCKET_INCLUDE_DIRS})
|
target_include_directories(ixwebsocket PUBLIC $<BUILD_INTERFACE:${IXWEBSOCKET_INCLUDE_DIRS}> $<INSTALL_INTERFACE:include/ixwebsocket>)
|
||||||
|
|
||||||
set_target_properties(ixwebsocket PROPERTIES PUBLIC_HEADER "${IXWEBSOCKET_HEADERS}")
|
set_target_properties(ixwebsocket PROPERTIES PUBLIC_HEADER "${IXWEBSOCKET_HEADERS}")
|
||||||
|
|
||||||
install(TARGETS ixwebsocket
|
install(TARGETS ixwebsocket EXPORT ixwebsocket
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
||||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ixwebsocket/
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ixwebsocket/
|
||||||
)
|
)
|
||||||
|
|
||||||
|
install(EXPORT ixwebsocket NAMESPACE ixwebsocket:: DESTINATION lib/cmake/ixwebsocket)
|
||||||
|
export(EXPORT ixwebsocket NAMESPACE ixwebsocket:: FILE ixwebsocketConfig.cmake)
|
||||||
|
|
||||||
if (USE_WS OR USE_TEST)
|
if (USE_WS OR USE_TEST)
|
||||||
add_subdirectory(ixcore)
|
add_subdirectory(ixcore)
|
||||||
add_subdirectory(ixcrypto)
|
add_subdirectory(ixcrypto)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ IXWebSocket client code is autobahn compliant beginning with the 6.0.0 version.
|
|||||||
If your company or project is using this library, feel free to open an issue or PR to amend this list.
|
If your company or project is using this library, feel free to open an issue or PR to amend this list.
|
||||||
|
|
||||||
- [Machine Zone](https://www.mz.com)
|
- [Machine Zone](https://www.mz.com)
|
||||||
- [Tokio](https://gitlab.com/HCInk/tokio), a discord library focused on audio playback with node bindings.
|
- [dis-light](https://gitlab.com/HCInk/dis-light), a discord library with a node frontend.
|
||||||
- [libDiscordBot](https://github.com/tostc/libDiscordBot/tree/master), a work in progress discord library
|
- [libDiscordBot](https://github.com/tostc/libDiscordBot/tree/master), a work in progress discord library
|
||||||
- [gwebsocket](https://github.com/norrbotten/gwebsocket), a websocket (lua) module for Garry's Mod
|
- [gwebsocket](https://github.com/norrbotten/gwebsocket), a websocket (lua) module for Garry's Mod
|
||||||
- [DisCPP](https://github.com/DisCPP/DisCPP), a simple but feature rich Discord API wrapper
|
- [DisCPP](https://github.com/DisCPP/DisCPP), a simple but feature rich Discord API wrapper
|
||||||
|
|||||||
@@ -1,18 +1,6 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All changes to this project will be documented in this file.
|
All changes to this project will be documented in this file.
|
||||||
|
|
||||||
## [9.6.4] - 2020-05-20
|
|
||||||
|
|
||||||
(compiler fix) support clang 5 and earlier (contributed by @LunarWatcher)
|
|
||||||
|
|
||||||
## [9.6.3] - 2020-05-18
|
|
||||||
|
|
||||||
(cmake) revert CMake changes to fix #203 and be able to use an external OpenSSL
|
|
||||||
|
|
||||||
## [9.6.2] - 2020-05-17
|
|
||||||
|
|
||||||
(cmake) make install cmake files optional to not conflict with vcpkg
|
|
||||||
|
|
||||||
## [9.6.1] - 2020-05-17
|
## [9.6.1] - 2020-05-17
|
||||||
|
|
||||||
(windows + tls) mbedtls is the default windows tls backend + add ability to load system certificates with mbdetls on windows
|
(windows + tls) mbedtls is the default windows tls backend + add ability to load system certificates with mbdetls on windows
|
||||||
|
|||||||
@@ -42,19 +42,6 @@ It is possible to get IXWebSocket through Microsoft [vcpkg](https://github.com/m
|
|||||||
```
|
```
|
||||||
vcpkg install ixwebsocket
|
vcpkg install ixwebsocket
|
||||||
```
|
```
|
||||||
To use the installed package within a cmake project, use the following:
|
|
||||||
```cmake
|
|
||||||
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "") # this is super important in order for cmake to include the vcpkg search/lib paths!
|
|
||||||
|
|
||||||
# find library and its headers
|
|
||||||
find_path(IXWEBSOCKET_INCLUDE_DIR ixwebsocket/IXWebSocket.h)
|
|
||||||
find_library(IXWEBSOCKET_LIBRARY ixwebsocket)
|
|
||||||
# include headers
|
|
||||||
include_directories(${IXWEBSOCKET_INCLUDE_DIR})
|
|
||||||
# ...
|
|
||||||
target_link_libraries(${PROJECT_NAME} ... ${IXWEBSOCKET_LIBRARY}) # Cmake will automatically fail the generation if the lib was not found, i.e is set to NOTFOUNS
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
### Conan
|
### Conan
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define IX_WEBSOCKET_VERSION "9.6.4"
|
#define IX_WEBSOCKET_VERSION "9.6.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user