early-access version 2853
This commit is contained in:
129
externals/vcpkg/ports/aubio/CMakeLists.txt
vendored
Executable file
129
externals/vcpkg/ports/aubio/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,129 @@
|
||||
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
|
||||
-DHAVE_STDIO_H=1
|
||||
-DHAVE_MATH_H=1
|
||||
-DHAVE_STRING_H=1
|
||||
-DHAVE_LIMITS_H=1
|
||||
-DHAVE_STDARG_H=1
|
||||
-DHAVE_ERRNO_H=1
|
||||
-DHAVE_C99_VARARGS_MACROS=1
|
||||
-D_CRT_SECURE_NO_WARNINGS=1
|
||||
)
|
||||
|
||||
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 avformat swresample REQUIRED)
|
||||
find_package(BZip2 REQUIRED)
|
||||
find_package(LibLZMA REQUIRED)
|
||||
find_package(SndFile REQUIRED)
|
||||
|
||||
include_directories(${LIBLZMA_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
include_directories(src)
|
||||
|
||||
file(GLOB_RECURSE SOURCES src/*.c)
|
||||
|
||||
if(WIN32 AND NOT MINGW)
|
||||
set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h)
|
||||
endif()
|
||||
|
||||
add_library(aubio ${SOURCES})
|
||||
if(WITH_DEPENDENCIES)
|
||||
target_link_libraries(aubio PUBLIC
|
||||
SndFile::sndfile
|
||||
${FFMPEG_LIBRARIES}
|
||||
BZip2::BZip2
|
||||
${LIBLZMA_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(aubio PUBLIC ws2_32)
|
||||
endif()
|
||||
|
||||
if(BUILD_TOOLS AND WITH_DEPENDENCIES)
|
||||
set(EXAMPLE_EXECS aubiomfcc aubionotes aubioonset aubiopitch aubioquiet aubiotrack)
|
||||
foreach(EXAMPLE_EXEC ${EXAMPLE_EXECS})
|
||||
add_executable(${EXAMPLE_EXEC} examples/${EXAMPLE_EXEC}.c examples/utils.c examples/jackio.c)
|
||||
target_link_libraries(${EXAMPLE_EXEC} PRIVATE aubio)
|
||||
if(WIN32)
|
||||
target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_WIN_HACKS=1)
|
||||
target_link_libraries(${EXAMPLE_EXEC} PUBLIC ws2_32)
|
||||
else()
|
||||
target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_UNISTD_H=1)
|
||||
endif()
|
||||
endforeach()
|
||||
# Create and add fake config.h to avoid build errors (file is generated for
|
||||
# cross-platform requirements in waf build-system)
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/config.h" "")
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
|
||||
install(
|
||||
TARGETS ${EXAMPLE_EXECS}
|
||||
RUNTIME DESTINATION ${TOOLS_INSTALLDIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS aubio EXPORT AubioTargets
|
||||
INCLUDES DESTINATION include
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(EXPORT AubioTargets NAMESPACE Aubio:: DESTINATION share/aubio)
|
||||
|
||||
install(
|
||||
DIRECTORY src/
|
||||
DESTINATION include/aubio
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN "*_priv.h" EXCLUDE
|
||||
PATTERN "config.h" EXCLUDE
|
||||
)
|
||||
|
||||
# Create CMake configuration export file.
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake.in "@PACKAGE_INIT@\n")
|
||||
if(WITH_DEPENDENCIES)
|
||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake.in "
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(FFMPEG COMPONENTS avcodec avutil avformat swresample REQUIRED)
|
||||
find_dependency(BZip2 REQUIRED)
|
||||
find_dependency(LibLZMA REQUIRED)
|
||||
find_dependency(SndFile REQUIRED)
|
||||
")
|
||||
endif()
|
||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake.in "include(\${CMAKE_CURRENT_LIST_DIR}/AubioTargets.cmake)")
|
||||
|
||||
# Install CMake configuration export file.
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/AubioConfig.cmake
|
||||
INSTALL_DESTINATION share/aubio
|
||||
)
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_BINARY_DIR}/AubioConfig.cmake
|
||||
DESTINATION
|
||||
share/aubio
|
||||
)
|
||||
36
externals/vcpkg/ports/aubio/portfile.cmake
vendored
Executable file
36
externals/vcpkg/ports/aubio/portfile.cmake
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO aubio/aubio
|
||||
REF 0.4.9
|
||||
SHA512 a22c7c581ce1f428270021591649273396e6dc222b3c7b3d46f5c4abf94a98be1ab89320cdbf1b6b60d4330eef23976439e3fc9e0f8d3cdd867dac4542fa48c9
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tools WITH_DEPENDENCIES
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
OPTIONS_RELEASE
|
||||
-DTOOLS_INSTALLDIR=tools/aubio
|
||||
-DBUILD_TOOLS=ON
|
||||
OPTIONS_DEBUG
|
||||
-DBUILD_TOOLS=OFF
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
46
externals/vcpkg/ports/aubio/vcpkg.json
vendored
Executable file
46
externals/vcpkg/ports/aubio/vcpkg.json
vendored
Executable file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "aubio",
|
||||
"version-semver": "0.4.9",
|
||||
"port-version": 9,
|
||||
"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",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"tools"
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build tools and add extra dependencies",
|
||||
"dependencies": [
|
||||
"bzip2",
|
||||
{
|
||||
"name": "ffmpeg",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"avcodec",
|
||||
"avformat",
|
||||
"swresample"
|
||||
]
|
||||
},
|
||||
"libflac",
|
||||
"liblzma",
|
||||
"libogg",
|
||||
{
|
||||
"name": "libsndfile",
|
||||
"default-features": false
|
||||
},
|
||||
"libvorbis"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user