diff options
| author | xyb <xyb@xyb.name> | 2020-09-14 16:06:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-14 16:06:48 -0700 |
| commit | 5c9e67076729c9ab5acf9b337a56326dbd1acd9e (patch) | |
| tree | 5642adfcdd403a2430daab29bae0ea25d57a0a5f | |
| parent | a9a1dac8c6996e67551e686441b2d61a77418eb1 (diff) | |
| download | vcpkg-5c9e67076729c9ab5acf9b337a56326dbd1acd9e.tar.gz vcpkg-5c9e67076729c9ab5acf9b337a56326dbd1acd9e.zip | |
[ffmpeg:arm64-linux] Fix bug #13511: [ffmpeg:arm64-linux] build failure. (#13512)
Root cause:
In `ffmpeg/portfile.cmake`, `--target-os=win32` is applied to all arm or arm64 targets.
This is wrong.
Fix:
Only apply "--target-os=win32" if VCPKG_TARGET_IS_WINDOWS.
Verify:
Run `./vcpkg install ffmpeg` on arm64-linux host, make sure the generated libraries are *.a not *.lib.
| -rw-r--r-- | ports/ffmpeg/CONTROL | 2 | ||||
| -rw-r--r-- | ports/ffmpeg/portfile.cmake | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 55f47aaf3..5a85f26e8 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,6 +1,6 @@ Source: ffmpeg Version: 4.2 -Port-Version: 23 +Port-Version: 24 Homepage: https://ffmpeg.org Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 49cff1d23..6473ded2b 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -340,12 +340,14 @@ endif() set(OPTIONS_CROSS "") if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") - vcpkg_find_acquire_program(GASPREPROCESSOR) - foreach(GAS_PATH ${GASPREPROCESSOR}) - get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) - set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${GAS_ITEM_PATH}") - endforeach(GAS_PATH) + if(VCPKG_TARGET_IS_WINDOWS) + set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") + vcpkg_find_acquire_program(GASPREPROCESSOR) + foreach(GAS_PATH ${GASPREPROCESSOR}) + get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) + set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${GAS_ITEM_PATH}") + endforeach(GAS_PATH) + endif() elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") else() |
