plugins: Set obs-vst as a default requirement

BUILD_VST option is added and set to ON by default.
If obs-vst is not present CMake will emit a fatal error.
This commit is contained in:
tytan652 2021-04-08 15:32:12 +02:00 committed by Jim
parent 98ad4face2
commit 029aee33c3

View File

@ -72,10 +72,13 @@ else()
set(BROWSER_AVAILABLE_INTERNAL OFF CACHE BOOL "Internal global cmake variable" FORCE)
endif()
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-vst/CMakeLists.txt")
add_subdirectory(obs-vst)
else()
message(STATUS "obs-vst submodule not found! Please fetch/update submodules. obs-vst plugin disabled.")
option(BUILD_VST "Build VST plugin" ON)
if(BUILD_VST)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/obs-vst/CMakeLists.txt")
add_subdirectory(obs-vst)
else()
message(FATAL_ERROR "obs-vst submodule not found! Please fetch submodules or set BUILD_VST=OFF.")
endif()
endif()
add_subdirectory(image-source)