Skip to content

Meson subproject sample test control#78

Closed
piotrrak wants to merge 3 commits intoh4tr3d:masterfrom
piotrrak:meson-subproject-sample-test-control
Closed

Meson subproject sample test control#78
piotrrak wants to merge 3 commits intoh4tr3d:masterfrom
piotrrak:meson-subproject-sample-test-control

Conversation

@piotrrak
Copy link
Copy Markdown
Contributor

Hello

Currently when using as this library meson subproject I have no control over on weather tests and samples are built.

The first change bumps required meson version to 0.54.0 (ffmpeg on meson-4.3 branch already requires it). This let me remove check for meson.override_dependency() and use 0.53.0 pretty summary().
Second change leaves defaults as they were - when built as subproject it defaults to no tests and samples.
While now I can specify -Davcpp:build_tests=true in my master project to adjust it to my likeing.

Copy link
Copy Markdown
Contributor Author

@piotrrak piotrrak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added third commit which updates README.md

Comment thread meson.build
if not meson.is_subproject()
subdir('src')
subdir('src')
subdir('example/api2-samples')
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently has slight semantic difference, since meson will be visiting 'example/api2-samples' subdirectory, it will be created in build directory when using non flat layout. Dunno if this mkdir is a concern, or not, but guess I should mention it.

@h4tr3d h4tr3d closed this Jan 26, 2026
@piotrrak piotrrak deleted the meson-subproject-sample-test-control branch February 2, 2026 10:38
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