Skip to content

Commit

Permalink
build: apply patch to event bus library
Browse files Browse the repository at this point in the history
Due to missing header file, event bus library can't be compiled with our toolchain.

This is a termporary solution while it's fixed upstream.
  • Loading branch information
LordTermor committed Sep 12, 2024
1 parent 497309a commit 8556a9c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/bundled-deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ FetchContent_Declare(
GIT_PROGRESS TRUE
)

set(eventbus_patch git apply ${CMAKE_CURRENT_LIST_DIR}/patches/eventbus.patch)

FetchContent_Declare(
event-bus
GIT_REPOSITORY https://github.com/gelldur/EventBus.git
GIT_TAG v3.1.2
EXCLUDE_FROM_ALL
GIT_PROGRESS TRUE
PATCH_COMMAND ${eventbus_patch}
UPDATE_DISCONNECTED 1
SOURCE_SUBDIR non_existent_subdir # Prevent FetchContent_MakeAvailable() from calling add_subdirectory()
# https://discourse.cmake.org/t/fetchcontent-a-directory-but-add-a-subdirectory/8603/15
)
Expand Down
12 changes: 12 additions & 0 deletions cmake/patches/eventbus.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/lib/src/dexode/eventbus/stream/ProtectedEventStream.hpp b/lib/src/dexode/eventbus/stream/ProtectedEventStream.hpp
index b6c0eda..21c10d9 100644
--- a/lib/src/dexode/eventbus/stream/ProtectedEventStream.hpp
+++ b/lib/src/dexode/eventbus/stream/ProtectedEventStream.hpp
@@ -4,6 +4,7 @@
#include <cassert>
#include <functional>
#include <iterator>
+#include <mutex>
#include <shared_mutex>
#include <vector>

0 comments on commit 8556a9c

Please sign in to comment.