[aubio] Fix definitions issues when build with dependencies (#17353)

* [aubio] Fix definitions issues when build with dependencies

* Update baseline version

* Update the dependency

* Set default-features to false

* Fix link error

* Update the baseline version

* Update the baseline version

* Update the baseline version

* Unset the debug postfix

* Update the baseline version

* Remove unused dependency

* Update the baseline version
This commit is contained in:
Phoebe 2021-06-11 02:23:14 +08:00 committed by GitHub
parent f51c70369b
commit 6982e51269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 14 deletions

View File

@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.8)
project(aubio C)
option(WITH_DEPENDENCIES "Adds extra dependencies" ON)
option(BUILD_TOOLS "Build and install tools" ON)
add_definitions(
-DHAVE_STDLIB_H=1
@ -12,18 +13,23 @@ add_definitions(
-DHAVE_STDARG_H=1
-DHAVE_ERRNO_H=1
-DHAVE_C99_VARARGS_MACROS=1
-D_CRT_SECURE_NO_WARNINGS=1
)
set(CMAKE_DEBUG_POSTFIX d)
option(BUILD_TOOLS "Build and install tools" ON)
if(WITH_DEPENDENCIES)
add_definitions(
-DHAVE_SNDFILE=1
-DHAVE_WAVWRITE=1
-DHAVE_WAVREAD=1
-DHAVE_LIBAV=1
-DHAVE_SWRESAMPLE=1
)
endif()
set(TOOLS_INSTALLDIR "bin" CACHE STRING "Target directory for installed tools")
if(WITH_DEPENDENCIES)
find_package(FFMPEG COMPONENTS avcodec avutil avdevice avfilter avformat swresample REQUIRED)
find_package(FFMPEG COMPONENTS avcodec avutil avformat swresample REQUIRED)
find_package(BZip2 REQUIRED)
find_package(LibLZMA REQUIRED)
find_package(SndFile REQUIRED)

View File

@ -13,11 +13,6 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools WITH_DEPENDENCIES
tools HAVE_SNDFILE
tools HAVE_WAVWRITE
tools HAVE_WAVREAD
tools HAVE_LIBAV
tools HAVE_SWRESAMPLE
)
vcpkg_configure_cmake(

View File

@ -1,7 +1,7 @@
{
"name": "aubio",
"version-string": "0.4.9",
"port-version": 4,
"version-semver": "0.4.9",
"port-version": 5,
"description": "Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio.",
"homepage": "https://github.com/aubio/aubio",
"default-features": [
@ -12,7 +12,15 @@
"description": "Build tools and add extra dependencies",
"dependencies": [
"bzip2",
"ffmpeg",
{
"name": "ffmpeg",
"default-features": false,
"features": [
"avcodec",
"avformat",
"swresample"
]
},
"libflac",
"liblzma",
"libogg",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "229c53eddabe48fa718f95c3dd3094a694770a19",
"version-semver": "0.4.9",
"port-version": 5
},
{
"git-tree": "a5fd622dc9d70a1f4cca1e6bc09829e1844b7e0f",
"version-string": "0.4.9",

View File

@ -202,7 +202,7 @@
},
"aubio": {
"baseline": "0.4.9",
"port-version": 4
"port-version": 5
},
"audiofile": {
"baseline": "1.0.7",