[vamp-sdk] new package (#16883)

This commit is contained in:
Alexandre Bique 2021-03-29 18:28:11 +02:00 committed by GitHub
parent d4c34fd271
commit ec73ce4bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 155 additions and 0 deletions

View File

@ -0,0 +1,107 @@
cmake_minimum_required(VERSION 3.8)
project(vamp-cmake)
set(CMAKE_DEBUG_POSTFIX d)
find_package(SndFile REQUIRED)
set(VAMP_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/vamp/vamp.h)
set(SDK_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/Plugin.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/PluginAdapter.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/PluginBase.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/RealTime.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/FFT.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/plugguard.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-sdk/vamp-sdk.h)
set(SDK_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-sdk/acsymbols.c
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-sdk/FFT.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-sdk/PluginAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-sdk/RealTime.cpp)
set(HOST_SDK_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/Plugin.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginBase.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginHostAdapter.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/RealTime.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginBufferingAdapter.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginChannelAdapter.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginInputDomainAdapter.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginLoader.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginSummarisingAdapter.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/PluginWrapper.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/hostguard.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/host-c.h
${CMAKE_CURRENT_SOURCE_DIR}/vamp-hostsdk/vamp-hostsdk.h)
set(HOST_SDK_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/acsymbols.c
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/Files.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginBufferingAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginChannelAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginHostAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginInputDomainAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginLoader.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginSummarisingAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/PluginWrapper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/RealTime.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/vamp-hostsdk/host-c.cpp)
if(BUILD_SHARED_LIBS)
if(MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
endif()
add_library(vamp-sdk ${SDK_SRC} ${SDK_HEADERS})
add_library(vamp-hostsdk ${HOST_SDK_SRC} ${HOST_SDK_HEADERS})
message(${SDK_HEADERS})
set_target_properties(vamp-sdk PROPERTIES PUBLIC_HEADER "${SDK_HEADERS}")
set_target_properties(vamp-hostsdk PROPERTIES PUBLIC_HEADER
"${HOST_SDK_HEADERS}")
set_property(TARGET vamp-sdk PROPERTY CXX_STANDARD 11)
set_property(TARGET vamp-hostsdk PROPERTY CXX_STANDARD 11)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_definitions(-D_LIB -D_USE_MATH_DEFINES)
target_link_libraries(vamp-hostsdk PUBLIC SndFile::sndfile)
target_link_libraries(vamp-sdk PUBLIC SndFile::sndfile)
install(
TARGETS vamp-hostsdk vamp-sdk
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
if(NOT DISABLE_INSTALL_HEADERS)
install(
DIRECTORY vamp-hostsdk/
DESTINATION include/vamp-sdk/vamp-hostsdk
FILES_MATCHING
PATTERN "*.h"
PATTERN "*_priv.h" EXCLUDE
PATTERN "config.h" EXCLUDE)
install(
DIRECTORY vamp-sdk/
DESTINATION include/vamp-sdk/vamp-sdk
FILES_MATCHING
PATTERN "*.h"
PATTERN "*_priv.h" EXCLUDE
PATTERN "config.h" EXCLUDE)
install(
DIRECTORY vamp/
DESTINATION include/vamp-sdk/vamp
FILES_MATCHING
PATTERN "*.h"
PATTERN "*_priv.h" EXCLUDE
PATTERN "config.h" EXCLUDE)
endif()

View File

@ -0,0 +1,24 @@
vcpkg_download_distfile(ARCHIVE
URLS "https://code.soundsoftware.ac.uk/attachments/download/2589/vamp-plugin-sdk-2.9.0.zip"
FILENAME "vamp-plugin-sdk-2.9.0.zip"
SHA512 38222f074c17ba420fcc1ad6639048c8f282b892a4baf4257481d7f65f2b5a62685d8bc8e9cbbb5b77063a92f33dc3d2f138ea9b21c475ae1c456146056720ed
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# # Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

11
ports/vamp-sdk/vcpkg.json Normal file
View File

@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "vamp-sdk",
"version": "2.9",
"description": "Library for VAMP plugins",
"homepage": "https://www.vamp-plugins.org/develop.html",
"supports": "!uwp",
"dependencies": [
"libsndfile"
]
}

View File

@ -6168,6 +6168,10 @@
"baseline": "0.2.1",
"port-version": 0
},
"vamp-sdk": {
"baseline": "2.9",
"port-version": 0
},
"variant-lite": {
"baseline": "1.2.2",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "f98530b4731d88b3ddda90a25ad998076da19425",
"version": "2.9",
"port-version": 0
}
]
}