From 7c1da9ba2fdf6ffb2d93fe7240854f686f1425d4 Mon Sep 17 00:00:00 2001 From: Vitaly Lipatov Date: Sun, 30 Jul 2023 04:19:59 +0300 Subject: [PATCH 1/4] cmake/external.cmake: add link_libyuv function To: wine-devel --- owt/cmake/external.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/owt/cmake/external.cmake b/owt/cmake/external.cmake index 4147d90d..49eedf04 100644 --- a/owt/cmake/external.cmake +++ b/owt/cmake/external.cmake @@ -178,6 +178,23 @@ function(link_crc32c target_name) endif() endfunction() +# libyuv +function(link_libyuv target_name) + if (TG_OWT_PACKAGED_BUILD) + find_package(PkgConfig REQUIRED) + pkg_check_modules(LIBYUV libyuv) + set(LIBYUV_FOUND ${LIBYUV_FOUND} PARENT_SCOPE) + if (LIBYUV_FOUND) + target_link_libraries(${target_name} PRIVATE ${LIBYUV_LIBRARIES}) + target_include_directories(${target_name} PRIVATE ${LIBYUV_INCLUDE_DIRS}) + endif() + endif() + if (NOT LIBYUV_FOUND) + target_link_libraries(${target_name} PRIVATE tg_owt::libyuv) + endif() +endfunction() + + function(link_glib target_name) find_package(PkgConfig REQUIRED) pkg_check_modules(GLIB2 REQUIRED glib-2.0) -- 2.33.8