From 0c810d357bf3c9d6fd76bf900d33c891822c4959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Sun, 27 Sep 2020 17:51:21 -0700 Subject: [PATCH] [gamma] Fix find dependency libsndfile (#13698) * [gamma] Fix find dependency libsndfile * [gamma] Add homepage Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com> --- ports/gamma/CMakeLists.txt | 7 +++---- ports/gamma/CONTROL | 4 +++- ports/gamma/portfile.cmake | 4 +--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ports/gamma/CMakeLists.txt b/ports/gamma/CMakeLists.txt index 1f1581ba1c..45f0ba78b4 100644 --- a/ports/gamma/CMakeLists.txt +++ b/ports/gamma/CMakeLists.txt @@ -3,8 +3,7 @@ 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_package(SndFile CONFIG REQUIRED) find_path(PORTAUDIO_H portaudio.h) find_library(PORTAUDIO_LIB NAMES portaudio) @@ -25,10 +24,10 @@ set(SOURCEFILES src/Timer.cpp src/SoundFile.cpp) -include_directories(. Gamma ${CMAKE_INSTALL_FULL_INCLUDEDIR} ${PORTAUDIO_H} ${LIBSNDFILE_H}) +include_directories(. Gamma ${CMAKE_INSTALL_FULL_INCLUDEDIR} ${PORTAUDIO_H}) add_library (gamma ${SOURCEFILES}) -target_link_libraries(gamma PUBLIC ${LIBSNDFILE_LIB} ${PORTAUDIO_LIB}) +target_link_libraries(gamma PUBLIC SndFile::sndfile ${PORTAUDIO_LIB}) install( TARGETS gamma diff --git a/ports/gamma/CONTROL b/ports/gamma/CONTROL index 7e9a41e990..b0814d9196 100644 --- a/ports/gamma/CONTROL +++ b/ports/gamma/CONTROL @@ -1,4 +1,6 @@ Source: gamma -Version: gamma-2018-01-27-1 +Version: gamma-2018-01-27 +Port-Version: 2 +Homepage: https://github.com/LancePutnam/Gamma 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. diff --git a/ports/gamma/portfile.cmake b/ports/gamma/portfile.cmake index a96a32d3ce..0437842d85 100644 --- a/ports/gamma/portfile.cmake +++ b/ports/gamma/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) set(GAMMA_RELEASE_TAG "cc442ad0c5da369966cd937a96925c7b9a04e9e5") @@ -24,4 +22,4 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/gamma RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)