From 2a9760c5e5d76d61d2ecfe160b731f7de59e692f Mon Sep 17 00:00:00 2001 From: dijunkun Date: Fri, 17 Nov 2023 16:59:27 +0800 Subject: [PATCH] Fix openh264 compile error on MacOS --- application/remote_desk/remote_desk_gui/main.cpp | 2 +- src/common/common.cpp | 6 ++++++ src/common/common.h | 2 ++ src/log/log.cpp | 6 ++++++ src/log/log.h | 2 ++ src/ringbuffer/ringbuffer.cpp | 6 ++++++ src/ringbuffer/ringbuffer.h | 2 ++ xmake.lua | 2 +- 8 files changed, 26 insertions(+), 2 deletions(-) diff --git a/application/remote_desk/remote_desk_gui/main.cpp b/application/remote_desk/remote_desk_gui/main.cpp index a1a28c3..7512a84 100644 --- a/application/remote_desk/remote_desk_gui/main.cpp +++ b/application/remote_desk/remote_desk_gui/main.cpp @@ -708,7 +708,7 @@ int main() { SDL_UpdateTexture(sdlTexture, NULL, dst_buffer, pixel_w); } else { if (joined) { - // ProcessMouseKeyEven(event); + ProcessMouseKeyEven(event); } } } diff --git a/src/common/common.cpp b/src/common/common.cpp index e69de29..e8fa025 100644 --- a/src/common/common.cpp +++ b/src/common/common.cpp @@ -0,0 +1,6 @@ +#include "common.h" + +int CommonDummy() +{ + return 0; +} \ No newline at end of file diff --git a/src/common/common.h b/src/common/common.h index 75a5700..42fb278 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -3,6 +3,8 @@ #include +int CommonDummy(); + constexpr size_t HASH_STRING_PIECE(const char *string_piece) { std::size_t result = 0; while (*string_piece) { diff --git a/src/log/log.cpp b/src/log/log.cpp index e69de29..7f73254 100644 --- a/src/log/log.cpp +++ b/src/log/log.cpp @@ -0,0 +1,6 @@ +#include "log.h" + +int LogDummy() +{ + return 0; +} \ No newline at end of file diff --git a/src/log/log.h b/src/log/log.h index 71c690c..12cc03d 100644 --- a/src/log/log.h +++ b/src/log/log.h @@ -31,6 +31,8 @@ constexpr auto LOGGER_NAME = "siganl"; constexpr auto LOGGER_NAME = "rtc"; #endif +int LogDummy(); + #define LOG_INFO(...) \ if (nullptr == spdlog::get(LOGGER_NAME)) { \ auto now = std::chrono::system_clock::now() + std::chrono::hours(8); \ diff --git a/src/ringbuffer/ringbuffer.cpp b/src/ringbuffer/ringbuffer.cpp index e69de29..cb19321 100644 --- a/src/ringbuffer/ringbuffer.cpp +++ b/src/ringbuffer/ringbuffer.cpp @@ -0,0 +1,6 @@ +#include "ringbuffer.h" + +int RingBufferDummy() +{ + return 0; +} \ No newline at end of file diff --git a/src/ringbuffer/ringbuffer.h b/src/ringbuffer/ringbuffer.h index c8dd8a1..4d94323 100644 --- a/src/ringbuffer/ringbuffer.h +++ b/src/ringbuffer/ringbuffer.h @@ -3,6 +3,8 @@ #include +int RingBufferDummy(); + class Data { public: Data() = default; diff --git a/xmake.lua b/xmake.lua index 065b4d4..adfc0c3 100644 --- a/xmake.lua +++ b/xmake.lua @@ -48,7 +48,7 @@ else elseif is_os("macosx") then add_requires("ffmpeg 5.1.2", {system = false}) add_requires("brew::libnice", "brew::glib") - add_requires("openh264 2.1.1", {configs = {shared = false}}) + add_requires("brew::openh264", {configs = {shared = false}}) end includes("application/remote_desk")