From fd396bfabbec149fb652c1ce5fe9a5ebc0499852 Mon Sep 17 00:00:00 2001 From: Nick Porcino Date: Sat, 4 Jul 2026 16:51:07 -0700 Subject: [PATCH 1/2] Install public headers; de-duplicate install include dir An installed libnyquist shipped its static lib and CMake config but never installed its headers (the "todo, install the headers" note), so find_package(libnyquist) succeeded yet the imported target's include dir (/include) contained no headers. Downstream projects that build against an installed libnyquist could not compile. - install(DIRECTORY include/libnyquist ...) so /include/libnyquist holds the public headers, matching $. - Drop the redundant INCLUDES DESTINATION on install(TARGETS): the install interface include dir is already declared via $ in target_include_directories(), so it was landing in INTERFACE_INCLUDE_DIRECTORIES twice. Verified: fresh configure/build/install now populates include/libnyquist and lists /include exactly once in the generated config. --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a7d764..cfa3367 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,8 +236,10 @@ install(TARGETS libnyquist LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) +# NOTE: the install interface include dir is declared once, via +# $ in target_include_directories() above. Do not also +# pass INCLUDES DESTINATION here or it lands in INTERFACE_INCLUDE_DIRECTORIES twice. # install the cmake configuration files install(EXPORT libnyquist @@ -248,7 +250,10 @@ install(EXPORT libnyquist message(STATUS "CMAKE_INSTALL_INCLUDEDIR: ${CMAKE_INSTALL_INCLUDEDIR}") -# todo, install the headers +# install the public headers so an installed libnyquist is usable by consumers +# (matches the $ above: #include ) +install(DIRECTORY "${LIBNYQUIST_ROOT}/include/libnyquist" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") # export the targets for use when libnyquist is included as a subproject export(TARGETS libnyquist From 94c91758aff8dc026380a9c6508cbf02e0858608 Mon Sep 17 00:00:00 2001 From: Nick Porcino Date: Sat, 4 Jul 2026 17:16:26 -0700 Subject: [PATCH 2/2] Remove 'register' storage-class from bundled RtAudio (illegal in C++17) RtApi::byteSwapBuffer used `register char val; register char *ptr;`. The register storage-class specifier was removed in C++17, so modern clang/gcc reject it (error: ISO C++17 does not allow 'register' ... [-Wregister]), breaking the libnyquist-examples build in CI on Linux/macOS. The keyword is a no-op hint on every compiler since C++11; drop it. --- third_party/rtaudio/RtAudio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/rtaudio/RtAudio.cpp b/third_party/rtaudio/RtAudio.cpp index a0e0012..15d1087 100644 --- a/third_party/rtaudio/RtAudio.cpp +++ b/third_party/rtaudio/RtAudio.cpp @@ -10119,8 +10119,8 @@ void RtApi :: convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info void RtApi :: byteSwapBuffer( char *buffer, unsigned int samples, RtAudioFormat format ) { - register char val; - register char *ptr; + char val; + char *ptr; ptr = buffer; if ( format == RTAUDIO_SINT16 ) {