File libx264-optional.patch of Package obs-studio (Revision f9f02df7d20800ea3c2b5e9df0dcbf19)

Currently displaying revision f9f02df7d20800ea3c2b5e9df0dcbf19 , Show latest

20
 
1
diff --git a/plugins/obs-x264/CMakeLists.txt b/plugins/obs-x264/CMakeLists.txt
2
index 958d553c8..59ea67205 100644
3
--- a/plugins/obs-x264/CMakeLists.txt
4
+++ b/plugins/obs-x264/CMakeLists.txt
5
@@ -1,7 +1,8 @@
6
 cmake_minimum_required(VERSION 3.28...3.30)
7
 
8
-find_package(Libx264 REQUIRED)
9
+find_package(Libx264)
10
 
11
+if(Libx264_FOUND)
12
 if(NOT TARGET OBS::opts-parser)
13
   add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser")
14
 endif()
15
@@ -20,3 +21,4 @@ endif()
16
 set_target_properties_obs(obs-x264 PROPERTIES FOLDER plugins/obs-x264 PREFIX "")
17
 
18
 include(cmake/x264-test.cmake)
19
+endif()
20