[mpg123] add Windows ARM support (#7934)

This commit is contained in:
driver1998 2019-09-04 05:31:59 +08:00 committed by Victor Romero
parent 6171b912f9
commit 56351a3a1a
2 changed files with 1160 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,16 @@ set(MPG123_HASH f226317dddb07841a13753603fa13c0a867605a5a051626cb30d45cfba266d3d
#architecture detection
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(MPG123_ARCH Win32)
set(MPG123_CONFIGURATION _x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(MPG123_ARCH x64)
set(MPG123_CONFIGURATION _x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(MPG123_ARCH ARM)
set(MPG123_CONFIGURATION _Generic)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(MPG123_ARCH ARM64)
set(MPG123_CONFIGURATION _Generic)
else()
message(FATAL_ERROR "unsupported architecture")
endif()
@ -29,6 +37,7 @@ vcpkg_extract_source_archive_ex(
PATCHES
0001-fix-crt-linking.patch
0002-fix-x86-build.patch
0003-add-arm-configs.patch
)
vcpkg_find_acquire_program(YASM)
@ -38,8 +47,8 @@ set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj
RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX}
DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX}
RELEASE_CONFIGURATION Release${MPG123_CONFIGURATION}${MPG123_CONFIGURATION_SUFFIX}
DEBUG_CONFIGURATION Debug${MPG123_CONFIGURATION}${MPG123_CONFIGURATION_SUFFIX}
)
message(STATUS "Installing")