1
0
Эх сурвалжийг харах

cmake: Depend entirely on pkg-config if found for VPL

Released versions of VPL have a pkg-config that orders dependencies
before the main VPL library. This causes our library searching with
pkg-config hints to instead search for the first dependency of VPL.

Instead just import the pkg-config definition directly and use it. This
is a bit more correct as all the dependencies will be correctly linked.

Also install the library since the debian package doesnt seem to depend
on the library itself...

fixes #9573
Kurt Kartaltepe 2 жил өмнө
parent
commit
9b98686c31

+ 1 - 1
.github/scripts/utils.zsh/setup_linux

@@ -97,7 +97,7 @@ sudo apt-get install -y --no-install-recommends \
   libasound2-dev libfdk-aac-dev libfontconfig-dev libfreetype6-dev libjack-jackd2-dev \
   libpulse-dev libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev \
   libpci-dev libdrm-dev \
-  nlohmann-json3-dev libwebsocketpp-dev libasio-dev libvpl-dev libqrcodegencpp-dev
+  nlohmann-json3-dev libwebsocketpp-dev libasio-dev libvpl-dev libvpl2 libqrcodegencpp-dev
 
 if (( UBUNTU_2210_OR_LATER )) sudo apt-get install -y --no-install-recommends librist-dev libsrt-openssl-dev
 

+ 5 - 1
cmake/Modules/FindVPL.cmake

@@ -44,7 +44,11 @@ The following cache variables may also be set:
 
 find_package(PkgConfig QUIET)
 if(PKG_CONFIG_FOUND)
-  pkg_search_module(_VPL QUIET vpl)
+  pkg_search_module(_VPL IMPORTED_TARGET QUIET vpl)
+  if(_VPL_FOUND)
+    add_library(VPL::VPL ALIAS PkgConfig::_VPL)
+    return()
+  endif()
 endif()
 
 find_path(