Skip to content

Conversation

@ePirat
Copy link
Collaborator

@ePirat ePirat commented Oct 29, 2025

With this change the header layout is actually made use of by preserving it when installing the headers, so that there is no longer a difference between the file layout used when building the library and what users get in the end.

Also the canonical include path is now even with meson corrected to be <spatialaudio/header>, given that spatialaudio headers names are somewhat generic at times and might even clash (kiss_fft for example), requiring to specify the
subdir as "namespacing" for the headers seems like a better idea. Note that it has always been like this with the old
CMake build anyway.

As this uses CMake's file sets for target_sources, it means we have to require CMake 3.23 (released March 29, 2022).

ePirat and others added 9 commits October 23, 2025 15:54
Purely cosmetic but brings this closer to the variant
meson generates.
This matches what is done in CMake, bringing the .pc files
closer together and given we have some quite generic header
names that might clash with others, seems like a good idea in
this case.
Co-Authored-By: Sebastian Ramacher <sramacher@debian.org>
Moves the library sources and headers all together in a subfolder
in source, like it is already done with kiss_fft.

This makes it clearer that especially the headers are not part of our
public API.
This should be available on any recent distro and even if not, is only
a build-time constraint so someone could build CMake from source if
on some ancient system or use the CMake provided repositories.

This is needed to use newer CMake features like target_sources file
sets.

See: https://cmake.org/cmake/help/latest/command/target_sources.html#file-sets
These headers are right now part of the public API/ABI, so this should
be made clear by moving them to the include directory until that
changes. They were already installed so this is not a public-facing
change.
CMake: Use a file set on the target, not only properly makes CMake
aware of the headers, it also sets the include directory properly
and preserves the subfolder when installing the file set.

Meson: Install headers with preserve_path to preserve subfolders.

The includes in the header files were changed also to properly
reference the other headers inside the correct subdirectories.
When building the library, do not add the subdirs to the include
paths, this brings things closer to how the headers are actually
used by library users as well.
@ePirat
Copy link
Collaborator Author

ePirat commented Oct 29, 2025

Supersedes #11

@ePirat ePirat added this to the v0.4.0 Release milestone Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant