Selaa lähdekoodia

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.
tytan652 4 vuotta sitten
vanhempi
sitoutus
029aee33c3
1 muutettua tiedostoa jossa 7 lisäystä ja 4 poistoa
  1. 7 4
      plugins/CMakeLists.txt

+ 7 - 4
plugins/CMakeLists.txt

@@ -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)