From 6cca6f88d968871a6b55eeba93af5d625e179a4b Mon Sep 17 00:00:00 2001 From: tytan652 Date: Wed, 2 Aug 2023 10:39:15 +0200 Subject: [PATCH] deps,shared,plugins: Move opts-parser to shared folder --- deps/CMakeLists.txt | 1 - plugins/obs-ffmpeg/cmake/dependencies.cmake | 2 +- plugins/obs-ffmpeg/cmake/legacy.cmake | 4 ++++ plugins/obs-outputs/CMakeLists.txt | 4 ++++ plugins/obs-outputs/cmake/legacy.cmake | 4 ++++ plugins/obs-x264/CMakeLists.txt | 2 +- plugins/obs-x264/cmake/legacy.cmake | 4 ++++ {deps => shared}/opts-parser/CMakeLists.txt | 0 {deps => shared}/opts-parser/opts-parser.c | 0 {deps => shared}/opts-parser/opts-parser.h | 0 10 files changed, 18 insertions(+), 3 deletions(-) rename {deps => shared}/opts-parser/CMakeLists.txt (100%) rename {deps => shared}/opts-parser/opts-parser.c (100%) rename {deps => shared}/opts-parser/opts-parser.h (100%) diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 1e5196ccc..b99cb2cd2 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -5,4 +5,3 @@ endif() add_subdirectory(blake2) add_subdirectory(glad) add_subdirectory(libcaption) -add_subdirectory(opts-parser) diff --git a/plugins/obs-ffmpeg/cmake/dependencies.cmake b/plugins/obs-ffmpeg/cmake/dependencies.cmake index 502e46cb7..6e809bbc2 100644 --- a/plugins/obs-ffmpeg/cmake/dependencies.cmake +++ b/plugins/obs-ffmpeg/cmake/dependencies.cmake @@ -21,7 +21,7 @@ if(NOT TARGET OBS::media-playback) endif() if(NOT TARGET OBS::opts-parser) - add_subdirectory("${CMAKE_SOURCE_DIR}/deps/opts-parser" "${CMAKE_BINARY_DIR}/deps/opts-parser") + add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser") endif() if(OS_WINDOWS) diff --git a/plugins/obs-ffmpeg/cmake/legacy.cmake b/plugins/obs-ffmpeg/cmake/legacy.cmake index d8a108b02..04866b90a 100644 --- a/plugins/obs-ffmpeg/cmake/legacy.cmake +++ b/plugins/obs-ffmpeg/cmake/legacy.cmake @@ -21,6 +21,10 @@ if(NOT TARGET OBS::media-playback) add_subdirectory("${CMAKE_SOURCE_DIR}/shared/media-playback" "${CMAKE_BINARY_DIR}/shared/media-playback") endif() +if(NOT TARGET OBS::opts-parser) + add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser") +endif() + add_subdirectory(ffmpeg-mux) if(ENABLE_NEW_MPEGTS_OUTPUT) find_package(Librist QUIET) diff --git a/plugins/obs-outputs/CMakeLists.txt b/plugins/obs-outputs/CMakeLists.txt index d0b7c4ba3..1e0a2fe41 100644 --- a/plugins/obs-outputs/CMakeLists.txt +++ b/plugins/obs-outputs/CMakeLists.txt @@ -9,6 +9,10 @@ if(NOT TARGET happy-eyeballs) add_subdirectory("${CMAKE_SOURCE_DIR}/shared/happy-eyeballs" "${CMAKE_BINARY_DIR}/shared/happy-eyeballs") endif() +if(NOT TARGET OBS::opts-parser) + add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser") +endif() + add_library(obs-outputs MODULE) add_library(OBS::outputs ALIAS obs-outputs) diff --git a/plugins/obs-outputs/cmake/legacy.cmake b/plugins/obs-outputs/cmake/legacy.cmake index e8f14b1a3..bc2607ec1 100644 --- a/plugins/obs-outputs/cmake/legacy.cmake +++ b/plugins/obs-outputs/cmake/legacy.cmake @@ -17,6 +17,10 @@ if(NOT TARGET happy-eyeballs) add_subdirectory("${CMAKE_SOURCE_DIR}/shared/happy-eyeballs" "${CMAKE_BINARY_DIR}/shared/happy-eyeballs") endif() +if(NOT TARGET OBS::opts-parser) + add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser") +endif() + target_sources( obs-outputs PRIVATE obs-outputs.c diff --git a/plugins/obs-x264/CMakeLists.txt b/plugins/obs-x264/CMakeLists.txt index 196c5ab7a..557d9655d 100644 --- a/plugins/obs-x264/CMakeLists.txt +++ b/plugins/obs-x264/CMakeLists.txt @@ -5,7 +5,7 @@ legacy_check() find_package(Libx264 REQUIRED) if(NOT TARGET OBS::opts-parser) - add_subdirectory("${CMAKE_SOURCE_DIR}/deps/opts-parser" "${CMAKE_BINARY_DIR}/deps/opts-parser") + add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser") endif() add_library(obs-x264 MODULE) diff --git a/plugins/obs-x264/cmake/legacy.cmake b/plugins/obs-x264/cmake/legacy.cmake index a7049c1d8..c9d0fa213 100644 --- a/plugins/obs-x264/cmake/legacy.cmake +++ b/plugins/obs-x264/cmake/legacy.cmake @@ -6,6 +6,10 @@ add_library(obs-x264 MODULE) add_library(OBS::x264 ALIAS obs-x264) add_executable(obs-x264-test) +if(NOT TARGET OBS::opts-parser) + add_subdirectory("${CMAKE_SOURCE_DIR}/shared/opts-parser" "${CMAKE_BINARY_DIR}/shared/opts-parser") +endif() + target_sources(obs-x264-test PRIVATE obs-x264-test.c) target_link_libraries(obs-x264-test PRIVATE OBS::opts-parser) diff --git a/deps/opts-parser/CMakeLists.txt b/shared/opts-parser/CMakeLists.txt similarity index 100% rename from deps/opts-parser/CMakeLists.txt rename to shared/opts-parser/CMakeLists.txt diff --git a/deps/opts-parser/opts-parser.c b/shared/opts-parser/opts-parser.c similarity index 100% rename from deps/opts-parser/opts-parser.c rename to shared/opts-parser/opts-parser.c diff --git a/deps/opts-parser/opts-parser.h b/shared/opts-parser/opts-parser.h similarity index 100% rename from deps/opts-parser/opts-parser.h rename to shared/opts-parser/opts-parser.h