diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b22aa50c..b413322d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,6 +209,7 @@ else() add_subdirectory("${CMAKE_SOURCE_DIR}/lib/settings" EXCLUDE_FROM_ALL) endif() +set(TWITCH_EVENTSUB_WS_LIBRARY_TYPE STATIC) add_subdirectory("${CMAKE_SOURCE_DIR}/lib/twitch-eventsub-ws" EXCLUDE_FROM_ALL) if (CHATTERINO_PLUGINS) diff --git a/lib/twitch-eventsub-ws b/lib/twitch-eventsub-ws index dca159775..12f831efe 160000 --- a/lib/twitch-eventsub-ws +++ b/lib/twitch-eventsub-ws @@ -1 +1 @@ -Subproject commit dca1597753a751b5c4c886b27c6fb699061d4419 +Subproject commit 12f831efefda61a36f0cd68e6eba74302ea4e6f1 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 753f04232..6c6c79834 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -834,11 +834,6 @@ if (BUILD_APP) target_link_libraries(${EXECUTABLE_PROJECT} PUBLIC ${LIBRARY_PROJECT}) - target_link_libraries(${EXECUTABLE_PROJECT} - PUBLIC - twitch-eventsub-ws - ) - set_target_directory_hierarchy(${EXECUTABLE_PROJECT}) if (WIN32) diff --git a/src/providers/twitch/EventSub.cpp b/src/providers/twitch/EventSub.cpp index 12ff08dd1..6943f0c54 100644 --- a/src/providers/twitch/EventSub.cpp +++ b/src/providers/twitch/EventSub.cpp @@ -266,11 +266,13 @@ void EventSub::start() .toUtf8() .toStdString(); - auto [host, port, path] = getEventSubHost(); + auto eventSubHost = getEventSubHost(); this->mainThread = std::make_unique([=] { try { + auto [host, port, path] = eventSubHost; + boost::asio::io_context ctx(1); boost::asio::ssl::context sslContext{