Skip to content

Commit

Permalink
cmake: Fix cross-compilation to windows.
Browse files Browse the repository at this point in the history
The change committed in 6012678 causes a fatal error if the ffmpeg
applications can't be found and used to determine its feature set.
This is fine for local compiles but cross compiled executable can't be
executed, so there's no point in requiring their existence (at this
point in the compilation).  Exempt cross compilation from this new
check.
  • Loading branch information
linuxdude42 committed Dec 30, 2024
1 parent 2dfd2ca commit bf800ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mythtv/cmake/MythFindPackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ find_package(PkgConfig REQUIRED)
# Packages provided by MythTV. These have no dependencies on MythTV and must
# have already been compiled and installed by the super-package.
#
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Windows" AND CMAKE_SYSTEM_PROCESSOR MATCHES
"x86|aarch64")
if(NOT CMAKE_CROSSCOMPILING
AND CMAKE_SYSTEM_NAME MATCHES "Linux|Windows"
AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86|aarch64")
pkg_check_modules(FFNVCODEC ffnvcodec REQUIRED IMPORTED_TARGET)
add_build_config(PkgConfig::FFNVCODEC "nvdec")
if(TARGET PkgConfig::FFNVCODEC)
Expand Down

0 comments on commit bf800ec

Please sign in to comment.