From 9efff1124a3ce8d648146a0b69c7cb38fb9ebe1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Sat, 28 Mar 2020 11:34:59 +0800 Subject: [PATCH] [ffmpeg] Disable vdpau in UNIX (#10161) * [ffmpeg] Disable vdpau in UNIX * [ffmpeg] Disable vdpau in OSX only * [freerdp] Add warning message when building in non-windows * revert 1ec77854917e513c7bdf17c8301fcd0a15aa685f changes --- ports/ffmpeg/FindFFMPEG.cmake.in | 2 +- ports/ffmpeg/portfile.cmake | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in index bb47069857eba4..cd61ffcc85604b 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake.in +++ b/ports/ffmpeg/FindFFMPEG.cmake.in @@ -33,7 +33,7 @@ set(FFMPEG_VERSION "4.2") find_dependency(Threads) if(UNIX) - list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread -lvdpau -lX11) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread -lX11) endif() if(@ENABLE_BZIP2@) diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 94736a79d534ab..a87ea6a0197a97 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -131,6 +131,10 @@ if("avresample" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-avresample") endif() +if (VCPKG_TARGET_IS_OSX) + set(OPTIONS "${OPTIONS} --disable-vdpau") # disable vdpau in OSX +endif() + if("nvcodec" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-cuda --enable-nvenc --enable-cuvid --disable-libnpp") else() @@ -152,7 +156,7 @@ else() message(FATAL_ERROR "Unsupported architecture") endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_UWP) set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") set(OPTIONS "${OPTIONS} --disable-programs") set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") @@ -166,7 +170,7 @@ set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(OPTIONS "${OPTIONS} --disable-static --enable-shared") - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if (VCPKG_TARGET_IS_UWP) set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") endif() endif()