From 4ed1e2f03c08803464c52e4c43c26e264b8c509d Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 18 Jul 2015 16:38:54 -0700 Subject: [PATCH] cmake: Allow external plugins to share libobs deps This addition allows external cmake modules to include the same modules that are commonly distributed with the main obs-studio repo: things like FFmpeg, curl, etc. --- cmake/external/FindLibobs.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/external/FindLibobs.cmake b/cmake/external/FindLibobs.cmake index 9d2d3c1d4..ab0a3deaf 100644 --- a/cmake/external/FindLibobs.cmake +++ b/cmake/external/FindLibobs.cmake @@ -96,6 +96,12 @@ if(LIBOBS_FOUND) set(LIBOBS_INCLUDE_DIRS ${LIBOBS_INCLUDE_DIR} ${W32_PTHREADS_INCLUDE_DIR}) set(LIBOBS_LIBRARIES ${LIBOBS_LIB} ${W32_PTHREADS_LIB}) include(${LIBOBS_INCLUDE_DIR}/../cmake/external/ObsPluginHelpers.cmake) + + # allows external plugins to easily use/share common dependencies that are often included with libobs (such as FFmpeg) + if(NOT DEFINED INCLUDED_LIBOBS_CMAKE_MODULES) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LIBOBS_INCLUDE_DIR}/../cmake/Modules/") + set(INCLUDED_LIBOBS_CMAKE_MODULES true) + endif() else() message(FATAL_ERROR "Could not find the libobs library" ) endif()