vcpkg/ports/vamp-sdk/CMakeLists.txt
Be 719ceca88d
[vamp-sdk] update to 2.10; switch download URL to GitHub; fix path of installed headers (#19572)
* [vamp-sdk] update to 2.10; switch download URL to GitHub

This works around a bad SSL certificate on
https://code.soundsoftware.ac.uk :

Error: Failed to download from mirror set:
https://code.soundsoftware.ac.uk/attachments/download/2589/vamp-plugin-sdk-2.9.0.zip: % Total    % Received % Xferd  Average Speed   Time    Time Time  Current
                                 Dload  Upload   Total   Spent Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

* [vamp-sdk] fix path of installed headers

These are the paths installed by the vamp-plugin-sdk-devel Fedora
package:

/usr/include/vamp
/usr/include/vamp-hostsdk
/usr/include/vamp-hostsdk/Plugin.h
/usr/include/vamp-hostsdk/PluginBase.h
/usr/include/vamp-hostsdk/PluginBufferingAdapter.h
/usr/include/vamp-hostsdk/PluginChannelAdapter.h
/usr/include/vamp-hostsdk/PluginHostAdapter.h
/usr/include/vamp-hostsdk/PluginInputDomainAdapter.h
/usr/include/vamp-hostsdk/PluginLoader.h
/usr/include/vamp-hostsdk/PluginSummarisingAdapter.h
/usr/include/vamp-hostsdk/PluginWrapper.h
/usr/include/vamp-hostsdk/RealTime.h
/usr/include/vamp-hostsdk/host-c.h
/usr/include/vamp-hostsdk/hostguard.h
/usr/include/vamp-hostsdk/vamp-hostsdk.h
/usr/include/vamp-sdk
/usr/include/vamp-sdk/FFT.h
/usr/include/vamp-sdk/Plugin.h
/usr/include/vamp-sdk/PluginAdapter.h
/usr/include/vamp-sdk/PluginBase.h
/usr/include/vamp-sdk/RealTime.h
/usr/include/vamp-sdk/plugguard.h
/usr/include/vamp-sdk/vamp-sdk.h
/usr/include/vamp/vamp.h
2021-08-18 17:10:35 -07:00

108 lines
3.8 KiB
CMake

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-hostsdk
FILES_MATCHING
PATTERN "*.h"
PATTERN "*_priv.h" EXCLUDE
PATTERN "config.h" EXCLUDE)
install(
DIRECTORY vamp-sdk/
DESTINATION include/vamp-sdk
FILES_MATCHING
PATTERN "*.h"
PATTERN "*_priv.h" EXCLUDE
PATTERN "config.h" EXCLUDE)
install(
DIRECTORY vamp/
DESTINATION include/vamp
FILES_MATCHING
PATTERN "*.h"
PATTERN "*_priv.h" EXCLUDE
PATTERN "config.h" EXCLUDE)
endif()