mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[aubio] Add support for find_package (#19996)
* [aubio] Add support for find_package * Add include(CMakeFindDependencyMacro) * x-add-version Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
f0c569e3e5
commit
3f4c4a61eb
@ -83,19 +83,47 @@ if(BUILD_TOOLS AND WITH_DEPENDENCIES)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS aubio
|
TARGETS aubio EXPORT AubioTargets
|
||||||
|
INCLUDES DESTINATION include
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT DISABLE_INSTALL_HEADERS)
|
install(EXPORT AubioTargets NAMESPACE Aubio:: DESTINATION share/aubio)
|
||||||
install(
|
|
||||||
DIRECTORY src/
|
install(
|
||||||
DESTINATION include/aubio
|
DIRECTORY src/
|
||||||
FILES_MATCHING
|
DESTINATION include/aubio
|
||||||
PATTERN "*.h"
|
FILES_MATCHING
|
||||||
PATTERN "*_priv.h" EXCLUDE
|
PATTERN "*.h"
|
||||||
PATTERN "config.h" EXCLUDE
|
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()
|
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
|
||||||
|
)
|
||||||
|
@ -15,7 +15,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|||||||
tools WITH_DEPENDENCIES
|
tools WITH_DEPENDENCIES
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_cmake_configure(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS ${FEATURE_OPTIONS}
|
OPTIONS ${FEATURE_OPTIONS}
|
||||||
@ -23,10 +23,13 @@ vcpkg_configure_cmake(
|
|||||||
-DTOOLS_INSTALLDIR=tools/aubio
|
-DTOOLS_INSTALLDIR=tools/aubio
|
||||||
-DBUILD_TOOLS=ON
|
-DBUILD_TOOLS=ON
|
||||||
OPTIONS_DEBUG
|
OPTIONS_DEBUG
|
||||||
-DDISABLE_INSTALL_HEADERS=1
|
|
||||||
-DBUILD_TOOLS=OFF
|
-DBUILD_TOOLS=OFF
|
||||||
)
|
)
|
||||||
vcpkg_install_cmake()
|
vcpkg_cmake_install()
|
||||||
|
|
||||||
|
vcpkg_cmake_config_fixup()
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
|
|
||||||
# Handle copyright and credentials
|
# Handle copyright and credentials
|
||||||
file(COPY
|
file(COPY
|
||||||
|
@ -1,9 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "aubio",
|
"name": "aubio",
|
||||||
"version-semver": "0.4.9",
|
"version-semver": "0.4.9",
|
||||||
"port-version": 6,
|
"port-version": 7,
|
||||||
"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.",
|
"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",
|
"homepage": "https://github.com/aubio/aubio",
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake-config",
|
||||||
|
"host": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"default-features": [
|
"default-features": [
|
||||||
"tools"
|
"tools"
|
||||||
],
|
],
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "b7115b787e5f71bf65454f4c3cff3ec85b4eb264",
|
||||||
|
"version-semver": "0.4.9",
|
||||||
|
"port-version": 7
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "0abf18908332cd2ccfe8e298f8fd90c0db42dcd9",
|
"git-tree": "0abf18908332cd2ccfe8e298f8fd90c0db42dcd9",
|
||||||
"version-semver": "0.4.9",
|
"version-semver": "0.4.9",
|
||||||
|
@ -214,7 +214,7 @@
|
|||||||
},
|
},
|
||||||
"aubio": {
|
"aubio": {
|
||||||
"baseline": "0.4.9",
|
"baseline": "0.4.9",
|
||||||
"port-version": 6
|
"port-version": 7
|
||||||
},
|
},
|
||||||
"audiofile": {
|
"audiofile": {
|
||||||
"baseline": "1.0.7",
|
"baseline": "1.0.7",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user