From e5a2a6758f2ec668d37fe843879f99d93d3fa385 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Tue, 26 Mar 2019 19:09:28 +0100 Subject: [PATCH] [sf2cute] new port (#5814) * add sf2cute port * clean up sf2cute * fix sf2cute project version * Fix sf2cute port * Use latest upstream tag --- ports/sf2cute/CONTROL | 6 +++++ ports/sf2cute/portfile.cmake | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 ports/sf2cute/CONTROL create mode 100644 ports/sf2cute/portfile.cmake diff --git a/ports/sf2cute/CONTROL b/ports/sf2cute/CONTROL new file mode 100644 index 000000000..7d850c694 --- /dev/null +++ b/ports/sf2cute/CONTROL @@ -0,0 +1,6 @@ +Source: sf2cute +Version: 0.2.0 +Description: C++14 Library for SoundFont 2 + +Feature: example +Description: Installs an example application \ No newline at end of file diff --git a/ports/sf2cute/portfile.cmake b/ports/sf2cute/portfile.cmake new file mode 100644 index 000000000..5a99ca11b --- /dev/null +++ b/ports/sf2cute/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gocha/sf2cute + REF v0.2 + HEAD_REF master + SHA512 721762556c392a134500fa110ec849a60d1285a57e4e8d9cacb6281bed02f5658a14694efcccb8248719558b45db89da5ad53c56990bb9c263a9760fe0d99b8f +) + +set(BUILD_EXAMPLE OFF) + +if("example" IN_LIST FEATURES) + set(BUILD_EXAMPLE ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DSF2CUTE_EXAMPLES_INSTALL_DIR=tools/sf2cute + OPTIONS_RELEASE + -DSF2CUTE_INSTALL_EXAMPLES=${BUILD_EXAMPLE} + -DSF2CUTE_EXAMPLES_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/sf2cute +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# move the .cmake files from the given directory to the expected directory by vcpkg +vcpkg_fixup_cmake_targets(CONFIG_PATH share/sf2cute) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sf2cute RENAME copyright) + +if(BUILD_EXAMPLE) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/sf2cute) +endif() + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME sf2cute)