summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2017-10-10 09:24:16 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2018-05-04 16:23:57 +0300
commit6d3282c28340c688e7749c99c29b8f8f7065a418 (patch)
tree464b389aa0c4ca05c173285735e97c13ff440a4c
parent13a6c5337b5f4407159c3d6aaea194c188c162a5 (diff)
FindGStreamer: Do not search for plugin dir if gstreamer was not found
-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()