diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index 0603fdcb85..91782fd181 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -1,32 +1,11 @@ cmake_minimum_required(VERSION 3.8) project(rtmidi CXX) -set(RTMIDI_SOURCES - ${PROJECT_SOURCE_DIR}/RtMidi.cpp - ${PROJECT_SOURCE_DIR}/rtmidi_c.cpp -) - -set(RTMIDI_HEADERS - ${PROJECT_SOURCE_DIR}/RtMidi.h - ${PROJECT_SOURCE_DIR}/rtmidi_c.h -) - -include_directories(${RTMIDI_HEADERS}) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_SHARED_LIBS ON) -else() - set(BUILD_SHARED_LIBS OFF) -endif() - +add_library(rtmidi RtMidi.cpp rtmidi_c.cpp) if(BUILD_SHARED_LIBS) - add_library(rtmidi SHARED ${RTMIDI_SOURCES}) target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) -else() - add_library(rtmidi STATIC ${RTMIDI_SOURCES}) 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}") @@ -43,6 +22,6 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(FILES "${PROJECT_SOURCE_DIR}/RtMidi.h" DESTINATION include) + install(FILES "RtMidi.h" DESTINATION include) install(FILES "${PROJECT_BINARY_DIR}/rtmidi_c.h" DESTINATION include) endif() diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL index 9cf64df9ed..9057812a05 100644 --- a/ports/rtmidi/CONTROL +++ b/ports/rtmidi/CONTROL @@ -1,3 +1,3 @@ Source: rtmidi -Version: 2.1.1 +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)