aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorautoantwort <41973254+autoantwort@users.noreply.github.com>2021-09-08 23:58:24 +0200
committerGitHub <noreply@github.com>2021-09-08 14:58:24 -0700
commit3f4c4a61eb94343f2c639e2e62900c4f50ce39c7 (patch)
tree8c9949ba42d25f60066852c8883c1b334a553c2e
parentf0c569e3e5f08343a689d2231997972b4408ed4b (diff)
downloadvcpkg-3f4c4a61eb94343f2c639e2e62900c4f50ce39c7.tar.gz
vcpkg-3f4c4a61eb94343f2c639e2e62900c4f50ce39c7.zip
[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>
-rw-r--r--ports/aubio/CMakeLists.txt48
-rw-r--r--ports/aubio/portfile.cmake9
-rw-r--r--ports/aubio/vcpkg.json12
-rw-r--r--versions/a-/aubio.json5
-rw-r--r--versions/baseline.json2
5 files changed, 61 insertions, 15 deletions
diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt
index e352acb34..b711c9f39 100644
--- a/ports/aubio/CMakeLists.txt
+++ b/ports/aubio/CMakeLists.txt
@@ -83,19 +83,47 @@ if(BUILD_TOOLS AND WITH_DEPENDENCIES)
endif()
install(
- TARGETS aubio
+ TARGETS aubio EXPORT AubioTargets
+ INCLUDES DESTINATION include
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
-if(NOT DISABLE_INSTALL_HEADERS)
- install(
- DIRECTORY src/
- DESTINATION include/aubio
- FILES_MATCHING
- PATTERN "*.h"
- PATTERN "*_priv.h" EXCLUDE
- PATTERN "config.h" EXCLUDE
- )
+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
+)
diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake
index 4cb7f7f6c..e8d49dce4 100644
--- a/ports/aubio/portfile.cmake
+++ b/ports/aubio/portfile.cmake
@@ -15,7 +15,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
tools WITH_DEPENDENCIES
)
-vcpkg_configure_cmake(
+vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS}
@@ -23,10 +23,13 @@ vcpkg_configure_cmake(
-DTOOLS_INSTALLDIR=tools/aubio
-DBUILD_TOOLS=ON
OPTIONS_DEBUG
- -DDISABLE_INSTALL_HEADERS=1
-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
file(COPY
diff --git a/ports/aubio/vcpkg.json b/ports/aubio/vcpkg.json
index bb9e7eda5..dd977ac92 100644
--- a/ports/aubio/vcpkg.json
+++ b/ports/aubio/vcpkg.json
@@ -1,9 +1,19 @@
{
"name": "aubio",
"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.",
"homepage": "https://github.com/aubio/aubio",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
"default-features": [
"tools"
],
diff --git a/versions/a-/aubio.json b/versions/a-/aubio.json
index 488d8b81f..540f6d7ea 100644
--- a/versions/a-/aubio.json
+++ b/versions/a-/aubio.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "b7115b787e5f71bf65454f4c3cff3ec85b4eb264",
+ "version-semver": "0.4.9",
+ "port-version": 7
+ },
+ {
"git-tree": "0abf18908332cd2ccfe8e298f8fd90c0db42dcd9",
"version-semver": "0.4.9",
"port-version": 6
diff --git a/versions/baseline.json b/versions/baseline.json
index 4b795ac57..3c8e19aa2 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -214,7 +214,7 @@
},
"aubio": {
"baseline": "0.4.9",
- "port-version": 6
+ "port-version": 7
},
"audiofile": {
"baseline": "1.0.7",