From 8e4319263cd493e2f4b905526ce164e8d679bee2 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 17 Jul 2024 07:39:56 +0200 Subject: [PATCH] Prefer OBS::libobs in find_package Closes #214 --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2116d2f..664c0f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,13 +47,16 @@ endif() set(CMAKE_C_STANDARD 11) if (BUILD_PLUGIN) + if (NOT TARGET OBS::libobs) + find_package(libobs QUIET) + endif() if (NOT TARGET libobs) find_package(LibObs QUIET) endif() - if (TARGET libobs) - set(PLUGIN_LIBS libobs) - elseif(TARGET OBS::libobs) + if (TARGET OBS::libobs) set(PLUGIN_LIBS OBS::libobs) + elseif (TARGET libobs) + set(PLUGIN_LIBS libobs) else() pkg_check_modules(LIBOBS libobs IMPORTED_TARGET REQUIRED) set(PLUGIN_LIBS PkgConfig::LIBOBS)