summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-10-23 02:29:56 -0400
committerRye <rye@alchemyviewer.org>2025-10-27 04:58:02 -0400
commit6876edd5bae672799fc50e36b547d90ccfb22c43 (patch)
tree4efb9d1e8eefec94ceeb79f7a6e200865603bbb4 /indra/cmake
parent0e3ba50520dd4cae89951e62c38b8647f76d9519 (diff)
Cherry-pick gstreamer10 from 57d423745fd1d3d0ea6a0c69b869a20c27e27fc5
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/GLIB.cmake22
-rw-r--r--indra/cmake/GStreamer010Plugin.cmake12
-rw-r--r--indra/cmake/GStreamer10Plugin.cmake27
4 files changed, 50 insertions, 12 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 2ba282bdb7..0aed268c29 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -28,6 +28,7 @@ set(cmake_SOURCE_FILES
GLEXT.cmake
GLH.cmake
GLM.cmake
+ GStreamer10Plugin.cmake
Havok.cmake
Hunspell.cmake
LLAddBuildTest.cmake
diff --git a/indra/cmake/GLIB.cmake b/indra/cmake/GLIB.cmake
new file mode 100644
index 0000000000..f52cbb7f87
--- /dev/null
+++ b/indra/cmake/GLIB.cmake
@@ -0,0 +1,22 @@
+include_guard()
+
+include(Prebuilt)
+
+add_library( ll::glib INTERFACE IMPORTED )
+add_library( ll::glib_headers INTERFACE IMPORTED )
+add_library( ll::gio INTERFACE IMPORTED )
+
+if( LINUX )
+ find_package(PkgConfig REQUIRED)
+ pkg_search_module(GLIB REQUIRED glib-2.0)
+ pkg_search_module(GIO REQUIRED gio-2.0)
+
+ target_include_directories( ll::glib SYSTEM INTERFACE ${GLIB_INCLUDE_DIRS} )
+ target_link_libraries( ll::glib INTERFACE ${GLIB_LDFLAGS} )
+ target_compile_definitions( ll::glib INTERFACE -DLL_GLIB=1)
+
+ target_include_directories( ll::glib_headers SYSTEM INTERFACE ${GLIB_INCLUDE_DIRS} )
+ target_compile_definitions( ll::glib_headers INTERFACE -DLL_GLIB=1)
+
+ target_link_libraries( ll::gio INTERFACE ${GIO_LDFLAGS} )
+endif()
diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake
deleted file mode 100644
index 61f6f74033..0000000000
--- a/indra/cmake/GStreamer010Plugin.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- cmake -*-
-include(Prebuilt)
-if (NOT LINUX)
- return()
-endif()
-
-add_library( ll::gstreamer INTERFACE IMPORTED )
-target_compile_definitions( ll::gstreamer INTERFACE LL_GSTREAMER010_ENABLED=1)
-use_system_binary(gstreamer)
-
-use_prebuilt_binary(gstreamer)
-
diff --git a/indra/cmake/GStreamer10Plugin.cmake b/indra/cmake/GStreamer10Plugin.cmake
new file mode 100644
index 0000000000..01522db3a3
--- /dev/null
+++ b/indra/cmake/GStreamer10Plugin.cmake
@@ -0,0 +1,27 @@
+# -*- cmake -*-
+
+include_guard()
+
+include(Prebuilt)
+include(GLIB)
+
+add_library( ll::gstreamer10 INTERFACE IMPORTED )
+
+if (LINUX)
+ find_package(PkgConfig REQUIRED)
+
+ pkg_check_modules(GSTREAMER10 REQUIRED gstreamer-1.0)
+ pkg_check_modules(GSTREAMER10_PLUGINS_BASE REQUIRED gstreamer-plugins-base-1.0)
+
+ target_include_directories( ll::gstreamer10 SYSTEM INTERFACE ${GSTREAMER10_INCLUDE_DIRS})
+ target_link_libraries( ll::gstreamer10 INTERFACE ll::glib_headers)
+
+endif ()
+
+if (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND)
+ set(GSTREAMER10 ON CACHE BOOL "Build with GStreamer-1.0 streaming media support.")
+endif (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND)
+
+if (GSTREAMER10)
+ add_definitions(-DLL_GSTREAMER10_ENABLED=1)
+endif (GSTREAMER10)