Skip to content

Commit e590ef8

Browse files
committed
Fix the Windows ARM64 build support 2
1 parent abbd907 commit e590ef8

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

BUILD.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,16 @@ Windows 10 or Windows 11 with the following software packages:
6262
- Make sure to install the the correct SDK for the targeted system arch - x86_64 or ARM64
6363
- [FFMPEG libraries for Windows]
6464
- Download the latest version of the FFMPEG shared libraries archive from https://github.com/BtbN/FFmpeg-Builds/releases
65-
- The archive must have the following pattern in the name: ffmpeg-*-win64-*-shared.zip
66-
- Example download link: https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip
67-
- Extract to <APP_INSTALLED_LOC>\bin\libs\ffmpeg
68-
- Add the path <APP_INSTALLED_LOC>\bin\libs\ffmpeg\win64\ to your system PATH
69-
- Verify that <APP_INSTALLED_LOC>\bin\libs\ffmpeg\win64\bin contains:
65+
- The archive must have the following pattern in the name: For Windows x86_64 ffmpeg-*-win64-*-shared.zip
66+
- Example download link:
67+
For Windows x86_64 https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip
68+
For Windows ARM64 https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-winarm64-lgpl-shared.zip
69+
- Extract to <APP_INSTALLED_LOC>\vk_video_decoder\bin\libs\ffmpeg
70+
- Verify that <APP_INSTALLED_LOC>\vk_video_decoder\bin\libs\ffmpeg\win64\bin or <APP_INSTALLED_LOC>\vk_video_decoder\bin\libs\ffmpeg\winarm64\bin contains:
7071
- avformat-59.dll
7172
- avutil-59.dll
7273
- avcodec-59.dll
73-
- Verify that <APP_INSTALLED_LOC>\bin\libs\ffmpeg\win64\lib contains the corresponding .lib files
74+
- Verify that <APP_INSTALLED_LOC>\vk_video_decoder\bin\libs\ffmpeg\win64\lib or <APP_INSTALLED_LOC>\vk_video_decoder\bin\libs\ffmpeg\winarm64\lib contains the corresponding .lib files
7475

7576
### Windows Build Commands
7677

CMakeLists.txt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,22 @@ if (EXISTS "${VULKAN_FFMPEG_LIB_PATH}")
6666
MESSAGE(STATUS "VULKAN_FFMPEG_LIB_PATH is set and valid ${VULKAN_FFMPEG_LIB_PATH}")
6767
else()
6868
if(WIN32)
69-
set(VULKAN_FFMPEG_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vk_video_decoder/bin/libs/ffmpeg/win64/lib" CACHE PATH "Path to FFMPEG libs directory" FORCE)
70-
message(STATUS "FFMPEG lib location ${VULKAN_FFMPEG_LIB_PATH}")
71-
set(FFMPEG_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vk_video_decoder/bin/libs/ffmpeg/win64/include" CACHE PATH "Path to FFMPEG include directory" FORCE)
72-
message(STATUS "FFMPEG include location ${FFMPEG_INCLUDE_DIR}")
69+
if ((CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm64") OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^ARM64"))
70+
set(VULKAN_FFMPEG_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vk_video_decoder/bin/libs/ffmpeg/winarm64/lib" CACHE PATH "Path to FFMPEG libs directory" FORCE)
71+
message(STATUS "FFMPEG Windows ARM64 lib location ${VULKAN_FFMPEG_LIB_PATH}")
72+
set(FFMPEG_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vk_video_decoder/bin/libs/ffmpeg/winarm64/include" CACHE PATH "Path to FFMPEG include directory" FORCE)
73+
message(STATUS "FFMPEG Windows ARM64 include location ${FFMPEG_INCLUDE_DIR}")
74+
elseif ((CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") OR (CMAKE_SYSTEM_PROCESSOR MATCHES "^ARM"))
75+
set(VULKAN_FFMPEG_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vk_video_decoder/bin/libs/ffmpeg/winarm/lib" CACHE PATH "Path to FFMPEG libs directory" FORCE)
76+
message(STATUS "FFMPEG Windows ARM64 lib location ${VULKAN_FFMPEG_LIB_PATH}")
77+
set(FFMPEG_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vk_video_decoder/bin/libs/ffmpeg/winarm/include" CACHE PATH "Path to FFMPEG include directory" FORCE)
78+
message(STATUS "FFMPEG Windows ARM64 include location ${FFMPEG_INCLUDE_DIR}")
79+
else()
80+
set(VULKAN_FFMPEG_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vk_video_decoder/bin/libs/ffmpeg/win64/lib" CACHE PATH "Path to FFMPEG libs directory" FORCE)
81+
message(STATUS "FFMPEG Windows x86_64 lib location ${VULKAN_FFMPEG_LIB_PATH}")
82+
set(FFMPEG_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vk_video_decoder/bin/libs/ffmpeg/win64/include" CACHE PATH "Path to FFMPEG include directory" FORCE)
83+
message(STATUS "FFMPEG Windows x86_64 include location ${FFMPEG_INCLUDE_DIR}")
84+
endif()
7385
else()
7486
message( STATUS "The location of the FFMPEG Lib: ${VULKAN_FFMPEG_LIB_PATH} expected the library to be installed to the regular system libs location" )
7587
endif()

0 commit comments

Comments
 (0)