Skip to content

Commit

Permalink
Fix video build problem on OSX
Browse files Browse the repository at this point in the history
egl requirement is just Linux/Android

Update
  • Loading branch information
DonLakeFlyer committed Jan 29, 2024
1 parent 5eb35c3 commit d406833
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,29 +196,31 @@ if (ENABLE_VIDEOSTREAMING)
gstreamer-gl-1.0>=1.20
)

if (MSVC)
pkg_check_modules(GST
${GST_DEPENDENCIES}
)
else ()
pkg_check_modules(GST
${GST_DEPENDENCIES}
egl
)
message(STATUS "GStreamer libs: ${GST_LIBRARIES}")
message(STATUS "GStreamer include dirs: ${GST_INCLUDE_DIRS}")
message(STATUS "GStreamer link dirs: ${GST_LIBRARY_DIRS}")
message(STATUS "GStreamer cflags: ${GST_CFLAGS}")
message(STATUS "GStreamer ldflags: ${GST_LDFLAGS}")
message(STATUS "GStreamer libs: ${GST_LIBS}")
if (LINUX OR ANDROID)
set(GST_DEPENDENCIES ${GST_DEPENDENCIES} egl)
endif ()

pkg_check_modules(GST
${GST_DEPENDENCIES}
)

message(STATUS "GStreamer libs: ${GST_LIBRARIES}")
message(STATUS "GStreamer include dirs: ${GST_INCLUDE_DIRS}")
message(STATUS "GStreamer link dirs: ${GST_LIBRARY_DIRS}")
message(STATUS "GStreamer cflags: ${GST_CFLAGS}")
message(STATUS "GStreamer ldflags: ${GST_LDFLAGS}")
message(STATUS "GStreamer libs: ${GST_LIBS}")

if (LINUX OR ANDROID)
message(STATUS "GStreamer egl libs: ${GST_EGL_LIBRARIES}")
message(STATUS "GStreamer egl include dirs: ${GST_EGL_INCLUDE_DIRS}")
message(STATUS "GStreamer egl link dirs: ${GST_EGL_LIBRARY_DIRS}")
message(STATUS "GStreamer egl cflags: ${GST_EGL_CFLAGS}")
message(STATUS "GStreamer egl ldflags: ${GST_EGL_LDFLAGS}")
message(STATUS "GStreamer egl libs: ${GST_EGL_LIBS}")
message(STATUS "gst found ${GST_FOUND}")
endif ()

message(STATUS "gst found ${GST_FOUND}")
if (GST_FOUND)
add_definitions(-DQGC_GST_STREAMING)
option(QGC_GST_MICROHARD_ENABLED "Enable microhard" OFF)
Expand Down

0 comments on commit d406833

Please sign in to comment.