mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[wavpack] arm support (#21790)
* [osx] set CMAKE_SYSTEM_PROCESSOR from VCPKG_TARGET_ARCHITECTURE on osx * [linux] Set CMAKE_ASM_COMPILER and CMAKE_ASM-ATT_COMPILER in case of crosscompile * [wavpack] migrate to vcpkg_cmake_install * [wavpack] enable arm builds * [wavpack] Add license field to vcpkg.json * [OSX] don't default to 86_64
This commit is contained in:
parent
9ccd693f1b
commit
8ca9b2b84c
@ -9,9 +9,8 @@ vcpkg_from_github(
|
||||
fix-symbol-exports.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
OPTIONS
|
||||
-DWAVPACK_INSTALL_DOCS=OFF
|
||||
-DWAVPACK_BUILD_PROGRAMS=OFF
|
||||
@ -21,12 +20,12 @@ vcpkg_configure_cmake(
|
||||
-DWAVPACK_BUILD_DOCS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
||||
else()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WavPack)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/WavPack)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
@ -1,8 +1,19 @@
|
||||
{
|
||||
"name": "wavpack",
|
||||
"version": "5.4.0",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "WavPack encode/decode library, command-line programs, and several plugins",
|
||||
"homepage": "https://github.com/dbry/WavPack",
|
||||
"supports": "!(arm | arm64)"
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "!(windows & arm)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -19,6 +19,12 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
||||
if(NOT DEFINED CMAKE_C_COMPILER)
|
||||
set(CMAKE_C_COMPILER "arm-linux-gnueabihf-gcc")
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_ASM_COMPILER)
|
||||
set(CMAKE_ASM_COMPILER "arm-linux-gnueabihf-gcc")
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_ASM-ATT_COMPILER)
|
||||
set(CMAKE_ASM-ATT_COMPILER "arm-linux-gnueabihf-as")
|
||||
endif()
|
||||
message(STATUS "Cross compiling arm on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}")
|
||||
endif()
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
@ -30,6 +36,12 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
if(NOT DEFINED CMAKE_C_COMPILER)
|
||||
set(CMAKE_C_COMPILER "aarch64-linux-gnu-gcc")
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_ASM_COMPILER)
|
||||
set(CMAKE_ASM_COMPILER "aarch64-linux-gnu-gcc")
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_ASM-ATT_COMPILER)
|
||||
set(CMAKE_ASM-ATT_COMPILER "aarch64-linux-gnu-as")
|
||||
endif()
|
||||
message(STATUS "Cross compiling arm64 on host x86_64, use cross compiler: ${CMAKE_CXX_COMPILER}/${CMAKE_C_COMPILER}")
|
||||
endif()
|
||||
endif()
|
||||
|
@ -2,17 +2,26 @@ if(NOT _VCPKG_OSX_TOOLCHAIN)
|
||||
set(_VCPKG_OSX_TOOLCHAIN 1)
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")
|
||||
|
||||
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}" CACHE STRING "")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}" CACHE STRING "")
|
||||
else()
|
||||
set(CMAKE_SYSTEM_VERSION "17.0.0" CACHE STRING "")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64" CACHE STRING "")
|
||||
endif()
|
||||
set(CMAKE_SYSTEM_NAME Darwin CACHE STRING "")
|
||||
|
||||
set(CMAKE_MACOSX_RPATH ON CACHE BOOL "")
|
||||
|
||||
if(NOT DEFINED CMAKE_SYSTEM_PROCESSOR)
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64 CACHE STRING "")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86 CACHE STRING "")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm64 CACHE STRING "")
|
||||
else()
|
||||
set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}" CACHE STRING "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
||||
if(NOT _CMAKE_IN_TRY_COMPILE)
|
||||
string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ")
|
||||
|
@ -7438,7 +7438,7 @@
|
||||
},
|
||||
"wavpack": {
|
||||
"baseline": "5.4.0",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"websocketpp": {
|
||||
"baseline": "0.8.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "39c514f313b4bc2fc7af0f3a889425bb78aca9e3",
|
||||
"version": "5.4.0",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "77b8c9ab85776abb2d049d562db7350525ddf7e2",
|
||||
"version": "5.4.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user