File libx264-optional.patch of Package obs-studio
diff --git a/plugins/obs-x264/CMakeLists.txt b/plugins/obs-x264/CMakeLists.txt
index 958d553c8..59ea67205 100644
--- a/plugins/obs-x264/CMakeLists.txt
+++ b/plugins/obs-x264/CMakeLists.txt
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.28...3.30)
-find_package(Libx264 REQUIRED)
+find_package(Libx264)
+if(Libx264_FOUND)
if(NOT TARGET OBS::opts-parser)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser")
endif()
@@ -20,3 +21,4 @@ endif()
set_target_properties_obs(obs-x264 PROPERTIES FOLDER plugins/obs-x264 PREFIX "")
include(cmake/x264-test.cmake)
+endif()