net-libs/ixwebsocket: add 11.4.4

Signed-off-by: Remigiusz Micielski <rmicielski@purelymail.com>
This commit is contained in:
Remigiusz Micielski
2023-09-30 15:34:33 +02:00
parent ff97384e92
commit 8917d4ce45
4 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c2fa943..15e3136 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -11,7 +11,6 @@ option(USE_TLS "Add TLS support" ON)
# Shared sources
set (TEST_TARGET_NAMES
- IXSocketTest
IXSocketConnectTest
IXWebSocketServerTest
IXWebSocketTestConnectionDisconnection
@@ -19,7 +18,6 @@ set (TEST_TARGET_NAMES
# IXHttpClientTest ## FIXME httpbin.org does not seem normal
IXUnityBuildsTest
IXHttpTest
- IXDNSLookupTest
IXWebSocketSubProtocolTest
# IXWebSocketBroadcastTest ## FIXME was depending on cobra / take a broadcast server from ws
IXStrCaseCompareTest
@@ -33,7 +31,6 @@ if (UNIX)
list(APPEND TEST_TARGET_NAMES
# Fail on Windows in CI probably because the pathing is wrong and
# some resource files cannot be found
- IXHttpServerTest
IXWebSocketChatTest
)
endif()

View File

@@ -0,0 +1,55 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e87173e..0ea2528 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -296,13 +296,9 @@ if (IXWEBSOCKET_INSTALL)
endif()
if (USE_WS OR USE_TEST)
- include(FetchContent)
- FetchContent_Declare(spdlog
- GIT_REPOSITORY "https://github.com/gabime/spdlog"
- GIT_TAG "v1.8.0"
- GIT_SHALLOW 1)
-
- FetchContent_MakeAvailable(spdlog)
+ find_package(spdlog REQUIRED)
+ find_package(fmt REQUIRED)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSPDLOG_FMT_EXTERNAL")
if (USE_WS)
add_subdirectory(ws)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c8822a4..fb12711 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -67,7 +67,7 @@ target_include_directories(ixwebsocket_test PRIVATE
../third_party
)
target_link_libraries(ixwebsocket_test ixwebsocket)
-target_link_libraries(ixwebsocket_test spdlog)
+target_link_libraries(ixwebsocket_test spdlog::spdlog fmt::fmt)
foreach(TEST_TARGET_NAME ${TEST_TARGET_NAMES})
add_executable(${TEST_TARGET_NAME}
@@ -90,7 +90,7 @@ foreach(TEST_TARGET_NAME ${TEST_TARGET_NAMES})
target_link_libraries(${TEST_TARGET_NAME} ixwebsocket_test)
target_link_libraries(${TEST_TARGET_NAME} ixwebsocket)
- target_link_libraries(${TEST_TARGET_NAME} spdlog)
+ target_link_libraries(${TEST_TARGET_NAME} spdlog::spdlog fmt::fmt)
add_test(NAME ${TEST_TARGET_NAME}
COMMAND ${TEST_TARGET_NAME}
diff --git a/ws/CMakeLists.txt b/ws/CMakeLists.txt
index 98f15de..10834e5 100644
--- a/ws/CMakeLists.txt
+++ b/ws/CMakeLists.txt
@@ -31,6 +31,6 @@ add_executable(ws
# library with the most dependencies come first
target_link_libraries(ws ixwebsocket)
-target_link_libraries(ws spdlog)
+target_link_libraries(ws spdlog::spdlog fmt::fmt)
install(TARGETS ws RUNTIME DESTINATION bin)