mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 06:03:02 +08:00
commit
acaaffebef
27
ports/rtmidi/CMakeLists.txt
Normal file
27
ports/rtmidi/CMakeLists.txt
Normal 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
3
ports/rtmidi/CONTROL
Normal 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)
|
20
ports/rtmidi/portfile.cmake
Normal file
20
ports/rtmidi/portfile.cmake
Normal 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)
|
Loading…
Reference in New Issue
Block a user