Skip to content

cmake: allow using system-installed readerwriterqueue #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alebcay
Copy link

@alebcay alebcay commented May 4, 2025

readerwriterqueue can be installed into system directories, and a number of distributions already package it. Where possible, use the system-provided copy rather than requiring it to be downloaded via FetchContent.

Currently the default behavior provided by this PR is to use the system-provided copy if available; if preferred, this can also be inverted to prefer the FetchContent and only rely on the system version via an explicit option.

The objective of this PR is to allow downstream packagers to rely on their own system-installed copies of dependencies where possible rather than have them be downloaded at compile time. (I'd like to do the same for ni-midi2, but the build system for ni-midi2 does not yet facilitate installing it into system directories.)

If this change is not accepted, downstream packagers can still point FetchContent to a system-provided copy of readerwriterqueue, e.g. -DFETCHCONTENT_SOURCE_DIR_READERWRITERQUEUE:PATH=/usr/lib/cmake/readerwriterqueue.

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