summary refs log tree commit diff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-08-14 01:03:27 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-08-14 01:03:27 +0200
commitf157602a52278519370c45cde4c9a0b12ede8d7e (patch)
tree26aaa10a71a1f44117605d4248c670a359427bb5 /CMakeLists.txt
parentBump flatpak dependency (diff)
downloadnheko-f157602a52278519370c45cde4c9a0b12ede8d7e.tar.xz
Disable call support, when GStreamer is unavailable
Integrating that in our CI is currently a bit hard, so disable it for
now, if GStreamer isn't found. Just make sure to build against GStreamer
for call support!
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e17f70f6..1be11fa3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -427,8 +427,7 @@ else()
 endif()
 
 include(FindPkgConfig)
-pkg_check_modules(GST_SDP REQUIRED IMPORTED_TARGET gstreamer-sdp-1.0>=1.14) 
-pkg_check_modules(GST_WEBRTC REQUIRED IMPORTED_TARGET gstreamer-webrtc-1.0>=1.14) 
+pkg_check_modules(GSTREAMER IMPORTED_TARGET gstreamer-sdp-1.0>=1.14 gstreamer-webrtc-1.0>=1.14) 
 
 # single instance functionality
 set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication")
@@ -595,8 +594,6 @@ target_link_libraries(nheko PRIVATE
 	lmdbxx::lmdbxx
 	liblmdb::lmdb
 	tweeny
-	PkgConfig::GST_SDP
-	PkgConfig::GST_WEBRTC
 	SingleApplication::SingleApplication)
 
 if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
@@ -606,6 +603,11 @@ target_precompile_headers(nheko
 	)
 endif()
 
+if (TARGET PkgConfig::GSTREAMER)
+	target_link_libraries(nheko PRIVATE PkgConfig::GSTREAMER)
+	target_compile_definitions(nheko PRIVATE GSTREAMER_AVAILABLE)
+endif()
+
 if(MSVC)
 	target_link_libraries(nheko PRIVATE ntdll)
 endif()