fix/arm-64

Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
Collecting
2025-11-03 18:25:00 +00:00
parent a3a9d004a6
commit c85d9cfd57

View File

@@ -370,7 +370,8 @@ if (ARCHITECTURE_arm64)
find_package(oaknut 2.0.1 CONFIG) find_package(oaknut 2.0.1 CONFIG)
endif() endif()
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) # Disable Dynarmic on Windows ARM64, as it requires non-MSVC assembly and is not implemented.
if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) AND NOT (MSVC AND ARCHITECTURE_arm64))
find_package(dynarmic 6.4.0 CONFIG) find_package(dynarmic 6.4.0 CONFIG)
endif() endif()
@@ -806,6 +807,20 @@ if(MSVC)
) )
endif() endif()
# Workaround for Windows ARM64 build:
# Vcpkg fails to automatically link FFmpeg and SDL2 to the sub-targets for this architecture.
# We will manually find the packages here and link them to the core library,
# which will make them available to all executables that depend on core.
if (MSVC AND ARCHITECTURE_arm64)
message(STATUS "Applying manual linking workaround for Windows ARM64")
find_package(FFmpeg 4.3 REQUIRED COMPONENTS avcodec avfilter swscale avutil)
find_package(SDL2 2.26.4 REQUIRED)
# Link these libraries to the 'core' target. Since both citron.exe and citron-cmd.exe
# depend on 'core', this will transitively provide the linker dependencies.
target_link_libraries(core PRIVATE FFmpeg::avcodec FFmpeg::avfilter FFmpeg::swscale FFmpeg::avutil SDL2::SDL2)
endif()
add_subdirectory(src) add_subdirectory(src)
# Apply the Boost.Process definition to the core target if it was found # Apply the Boost.Process definition to the core target if it was found