Skip to content

Commit

Permalink
[rtaudio] Fix hidden dependencies on Linux (#19516)
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0219-msft committed Aug 13, 2021
1 parent d306ab4 commit a02f8e1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 34 deletions.
26 changes: 0 additions & 26 deletions ports/rtaudio/LICENSE

This file was deleted.

17 changes: 10 additions & 7 deletions ports/rtaudio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ vcpkg_from_github(
HEAD_REF master
)

if(VCPKG_HOST_IS_LINUX)
message(WARNING "rtaudio requires ALSA on Linux; this is available on ubuntu via apt install libasound2-dev")
endif()

if(VCPKG_CRT_LINKAGE STREQUAL static)
set(RTAUDIO_STATIC_MSVCRT ON)
else()
Expand All @@ -22,7 +26,11 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT} ${FEATURE_OPTIONS}
OPTIONS
-DRTAUDIO_STATIC_MSVCRT=${RTAUDIO_STATIC_MSVCRT}
-DRTAUDIO_API_JACK=OFF
-DRTAUDIO_API_PULSE=OFF
${FEATURE_OPTIONS}
)

vcpkg_install_cmake()
Expand All @@ -31,9 +39,4 @@ vcpkg_fixup_cmake_targets()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})

# Version 5.1.0 has the license text embedded in the README.md, so we are including it as a standalone file in the vcpkg port
# Current master version of rtaudio has a LICENSE file which should be used instead for ports of future releases
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
1 change: 1 addition & 0 deletions ports/rtaudio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "rtaudio",
"version-date": "2021-05-18",
"port-version": 1,
"description": "A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO and WASAPI) operating systems.",
"homepage": "https://github.com/thestk/rtaudio",
"supports": "!uwp",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5666,7 +5666,7 @@
},
"rtaudio": {
"baseline": "2021-05-18",
"port-version": 0
"port-version": 1
},
"rtlsdr": {
"baseline": "2020-04-16-1",
Expand Down
5 changes: 5 additions & 0 deletions versions/r-/rtaudio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "73b803ac8a870dd48165b34aecc29f2155b5b172",
"version-date": "2021-05-18",
"port-version": 1
},
{
"git-tree": "0c7518511b154ea4ca636e2f6c43248b59cb47ed",
"version-date": "2021-05-18",
Expand Down

0 comments on commit a02f8e1

Please sign in to comment.