Skip to content

Install public headers; de-duplicate install include dir#1

Merged
meshula merged 2 commits into
masterfrom
fix-install-headers
Jul 5, 2026
Merged

Install public headers; de-duplicate install include dir#1
meshula merged 2 commits into
masterfrom
fix-install-headers

Conversation

@meshula

@meshula meshula commented Jul 5, 2026

Copy link
Copy Markdown
Member

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 $<INSTALL_INTERFACE:include>.
  • Drop the redundant INCLUDES DESTINATION on install(TARGETS): the install interface include dir is already declared via $<INSTALL_INTERFACE:include> 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.

Nick Porcino added 2 commits July 4, 2026 16:51
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
(<prefix>/include) contained no headers. Downstream projects that build
against an installed libnyquist could not compile.

- install(DIRECTORY include/libnyquist ...) so <prefix>/include/libnyquist
  holds the public headers, matching $<INSTALL_INTERFACE:include>.
- Drop the redundant INCLUDES DESTINATION on install(TARGETS): the install
  interface include dir is already declared via $<INSTALL_INTERFACE:include>
  in target_include_directories(), so it was landing in
  INTERFACE_INCLUDE_DIRECTORIES twice.

Verified: fresh configure/build/install now populates include/libnyquist
and lists <prefix>/include exactly once in the generated config.
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.
@meshula meshula merged commit e687b0e into master Jul 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant