Skip to content

cmake: allow using system-installed readerwriterqueue#157

Merged
jcelerier merged 1 commit intoceltera:masterfrom
alebcay:system-readerwriterqueue
Jul 3, 2025
Merged

cmake: allow using system-installed readerwriterqueue#157
jcelerier merged 1 commit intoceltera:masterfrom
alebcay:system-readerwriterqueue

Conversation

@alebcay
Copy link
Copy Markdown
Contributor

@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.

@jcelerier
Copy link
Copy Markdown
Member

Sorry, had missed this PR! reviewing

@jcelerier
Copy link
Copy Markdown
Member

yes, looks good :) thanks!

@jcelerier jcelerier force-pushed the system-readerwriterqueue branch from 74fd95d to 1922943 Compare July 3, 2025 16:41
@jcelerier jcelerier added this pull request to the merge queue Jul 3, 2025
Merged via the queue into celtera:master with commit a486f2e Jul 3, 2025
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.

2 participants