Merge pull request #1346 from atkawa7/rtmidi

[rtmidi] init port #582
This commit is contained in:
Robert Schumacher 2017-06-28 14:50:35 -07:00 committed by GitHub
commit acaaffebef
3 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.8)
project(rtmidi CXX)
add_library(rtmidi RtMidi.cpp rtmidi_c.cpp)
if(BUILD_SHARED_LIBS)
target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT)
endif()
file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT)
if (BUILD_SHARED_LIBS)
string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}")
else()
string(REPLACE "if defined(RTMIDI_EXPORT)" "if 0" RTMIDI_EXPORT "${RTMIDI_EXPORT}")
endif()
file(WRITE "${PROJECT_BINARY_DIR}/rtmidi_c.h" "${RTMIDI_EXPORT}")
install(
TARGETS rtmidi
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES "RtMidi.h" DESTINATION include)
install(FILES "${PROJECT_BINARY_DIR}/rtmidi_c.h" DESTINATION include)
endif()

3
ports/rtmidi/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: rtmidi
Version: 2.1.1-1
Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia)

View File

@ -0,0 +1,20 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO thestk/rtmidi
REF 2.1.1
SHA512 4d378720dd0f7c0e1a87741c088756839878ed56465b053040f70a1e039828fe221a6b1669b77b2fdd146cb192934c5719cc934c2c6a6304f44dbee2972c68e8
HEAD_REF master
)
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=ON
)
vcpkg_install_cmake()
file(INSTALL ${SOURCE_PATH}/readme DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtmidi RENAME copyright)