mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 10:43:33 +00:00
fix/arm64
Hopefully, otherwise I need to branch and figure this out. Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -807,17 +807,6 @@ if(MSVC)
|
||||
)
|
||||
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.
|
||||
# NOTE: This block must be placed BEFORE add_subdirectory(src)
|
||||
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)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
# Apply the Boost.Process definition to the core target if it was found
|
||||
@@ -825,13 +814,15 @@ if(DEFINED HAS_BOOST_PROCESS_DEFINITION)
|
||||
target_compile_definitions(core PRIVATE ${HAS_BOOST_PROCESS_DEFINITION})
|
||||
endif()
|
||||
|
||||
# Continue the ARM64 workaround by linking the found packages to the 'core' target
|
||||
# This must be placed AFTER add_subdirectory(src) where 'core' is defined
|
||||
# Workaround for Windows ARM64 build:
|
||||
# Vcpkg fails to automatically link FFmpeg and SDL2 to the sub-targets for this architecture.
|
||||
# We will manually link the libraries to the core library, which will make them available
|
||||
# to all executables that depend on core. This must be placed AFTER add_subdirectory(src).
|
||||
if (MSVC AND ARCHITECTURE_arm64)
|
||||
message(STATUS "Applying manual linking workaround for Windows ARM64")
|
||||
target_link_libraries(core PRIVATE FFmpeg::avcodec FFmpeg::avfilter FFmpeg::swscale FFmpeg::avutil SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
|
||||
# Apply PGO configuration to main targets
|
||||
if(CITRON_ENABLE_PGO_GENERATE OR CITRON_ENABLE_PGO_USE)
|
||||
if(TARGET citron)
|
||||
|
||||
Reference in New Issue
Block a user