From 12b3f4021641537b90727b23d42de5dff59006cd Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Sun, 21 Apr 2024 02:18:22 +0200 Subject: Avoid shadowing variables It's a source of confusion and possibly bugs to reuse the same variable name for multiple things. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f798cca..526c7f13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) include(CheckIncludeFiles) include(CheckFunctionExists) include(CheckLibraryExists) +include(CheckVariableExists) include(CheckTypeSize) include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) @@ -185,6 +186,13 @@ if(ENABLE_H264) add_definitions("-DHAVE_H264") set(H264_LIBS "WIN") # may be LIBAV in the future set(H264_LIBRARIES ole32 mfplat mfuuid wmcodecdspuuid) + + set(CMAKE_REQUIRED_LIBRARIES ${H264_LIBRARIES}) + check_variable_exists(CLSID_VideoProcessorMFT HAVE_VIDEO_PROCESSOR_MFT) + set(CMAKE_REQUIRED_LIBRARIES) + if(HAVE_VIDEO_PROCESSOR_MFT) + add_definitions("-DHAVE_VIDEO_PROCESSOR_MFT") + endif() else() find_package(Ffmpeg) if (AVCODEC_FOUND AND AVUTIL_FOUND AND SWSCALE_FOUND) -- cgit v1.2.3