Skip to content

Commit

Permalink
Fix Mac gstreamer support
Browse files Browse the repository at this point in the history
Local builds now work
  • Loading branch information
DonLakeFlyer committed Feb 1, 2025
1 parent 22c57f7 commit 1406b29
Showing 1 changed file with 22 additions and 4 deletions.
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

0 comments on commit 1406b29

Please sign in to comment.