summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/modules/FindGStreamer.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/modules/FindGStreamer.cmake b/cmake/modules/FindGStreamer.cmake
index fe6cde1..1981a07 100644
--- a/cmake/modules/FindGStreamer.cmake
+++ b/cmake/modules/FindGStreamer.cmake
@@ -33,9 +33,11 @@ find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(PKG_GSTREAMER gstreamer-${GSTREAMER_ABI_VERSION})
- exec_program(${PKG_CONFIG_EXECUTABLE}
- ARGS --variable pluginsdir gstreamer-${GSTREAMER_ABI_VERSION}
- OUTPUT_VARIABLE PKG_GSTREAMER_PLUGIN_DIR)
+ if(PKG_GSTREAMER_FOUND)
+ exec_program(${PKG_CONFIG_EXECUTABLE}
+ ARGS --variable pluginsdir gstreamer-${GSTREAMER_ABI_VERSION}
+ OUTPUT_VARIABLE PKG_GSTREAMER_PLUGIN_DIR)
+ endif()
set(GSTREAMER_DEFINITIONS ${PKG_GSTREAMER_CFLAGS})
endif()