Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mac gstreamer support #12381

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions src/VideoManager/VideoReceiver/GStreamer/gstqml6gl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)

set(GST_COMPONENTS Allocators App Audio Codecparsers Controller Fft GlEGL GlPrototypes GlWayland GlX11 Mpegts Net Pbutils Photography Riff Rtp Rtsp Sdp Tag Va)
find_package(GStreamer REQUIRED COMPONENTS OPTIONAL_COMPONENTS ${GST_COMPONENTS})

qt_add_library(gstqml6gl STATIC)

if(MACOS)
# Using FindGStreamer.cmake is currently bypassed on MACOS since it doesn't work
# So for now we hack in a simple hardwired setup which does work
find_library(GSTREAMER_FRAMEWORK GStreamer)
set(GST_PLUGINS_VERSION 1.24.12)
target_link_libraries(gstqml6gl
PUBLIC
"$<LINK_LIBRARY:FRAMEWORK,/Library/Frameworks/GStreamer.framework>"
)
target_include_directories(gstqml6gl
PUBLIC
/Library/Frameworks/GStreamer.framework/Headers
)
else()
set(GST_COMPONENTS Allocators App Audio Codecparsers Controller Fft GlEGL GlPrototypes GlWayland GlX11 Mpegts Net Pbutils Photography Riff Rtp Rtsp Sdp Tag Va)
find_package(GStreamer REQUIRED COMPONENTS OPTIONAL_COMPONENTS ${GST_COMPONENTS})
target_link_libraries(gstqml6gl
PUBLIC
GStreamer::GStreamer
)
endif()

target_link_libraries(gstqml6gl
PRIVATE
Qt6::GuiPrivate
Expand All @@ -13,7 +32,6 @@ target_link_libraries(gstqml6gl
Qt6::Gui
Qt6::Qml
Qt6::Quick
GStreamer::GStreamer
)

foreach(component IN LISTS GST_COMPONENTS)
Expand Down
Loading