Added Gamma library (#2957)

This commit is contained in:
dirkju 2018-03-06 02:35:31 +01:00 committed by Robert Schumacher
parent a477fd6b6e
commit 87fb30839c
3 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,44 @@
cmake_minimum_required (VERSION 3.0)
project (gamma)
# dependent on libsndfile and portaudio
find_path(LIBSNDFILE_H sndfile.h)
find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile)
find_path(PORTAUDIO_H portaudio.h)
find_library(PORTAUDIO_LIB NAMES portaudio)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(SOURCEFILES
src/arr.cpp
src/AudioIO.cpp
src/Conversion.cpp
src/Domain.cpp
src/DFT.cpp
src/FFT_fftpack.cpp
src/fftpack++1.cpp
src/fftpack++2.cpp
src/SoundFile.cpp
src/Print.cpp
src/Recorder.cpp
src/scl.cpp
src/Scheduler.cpp
src/Timer.cpp
src/SoundFile.cpp)
include_directories(. Gamma ${CMAKE_INSTALL_FULL_INCLUDEDIR} ${PORTAUDIO_H} ${LIBSNDFILE_H})
add_library (gamma ${SOURCEFILES})
target_link_libraries(gamma PUBLIC ${LIBSNDFILE_LIB} ${PORTAUDIO_LIB})
install(
TARGETS gamma
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_HEADERS)
install(DIRECTORY Gamma DESTINATION include FILES_MATCHING PATTERN "*.h")
endif()

4
ports/gamma/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: gamma
Version: gamma-2018-01-27
Build-Depends: libsndfile, portaudio
Description: Gamma is a cross-platform, C++ library for doing generic synthesis and filtering of signals. It is oriented towards real-time sound and graphics applications, but is equally useful for non-real-time tasks. Gamma is designed to be "light-footed" in terms of memory and processing making it highly suitable for plug-in development or embedding in other C++ projects.

View File

@ -0,0 +1,27 @@
# Instead of official release, base on commit hash for now.
set(GAMMA_RELEASE_TAG "cc442ad0c5da369966cd937a96925c7b9a04e9e5")
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Gamma-${GAMMA_RELEASE_TAG})
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/LancePutnam/Gamma/archive/cc442ad0c5da369966cd937a96925c7b9a04e9e5.zip"
FILENAME "gamma-${GAMMA_RELEASE_TAG}.zip"
SHA512 de44f4d07db0b2cf09e77508d993273d09788dfa919d549393bb77534922b65e9d8a1b8193b4b02c72e6bc4dd060b41b18ff3520a36d4c28f6e2fb4b1e859ee7
)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/gamma RENAME copyright)