Skip to content

Commit

Permalink
cmake: Fix build failure when ENABLE_NVDEC=OFF
Browse files Browse the repository at this point in the history
The code needs to validate that the PkgConfig::FFNVCODEC target exists
before trying to check its properties.

Fixes #1042
  • Loading branch information
linuxdude42 committed Feb 17, 2025
1 parent adb32f8 commit 7b8478c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mythtv/cmake/PrintConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,11 @@ if(ENABLE_FRONTEND)
message_trgt("x11/xrandr support " X11::Xrandr)
if(TARGET X11::X11)
message_trgt("VDPAU support " PkgConfig::VDPAU)
get_target_property(_FFNVCODEC_DEFS PkgConfig::FFNVCODEC INTERFACE_COMPILE_DEFINITIONS)
if("USING_NVDEC" IN_LIST _FFNVCODEC_DEFS)
set(_USING_NVDEC ON)
if(TARGET PkgConfig::FFNVCODEC)
get_target_property(_FFNVCODEC_DEFS PkgConfig::FFNVCODEC INTERFACE_COMPILE_DEFINITIONS)
if("USING_NVDEC" IN_LIST _FFNVCODEC_DEFS)
set(_USING_NVDEC ON)
endif()
endif()
message_vrbl("NVDEC support " _USING_NVDEC)
endif()
Expand Down

0 comments on commit 7b8478c

Please sign in to comment.