Skip to content
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

meson: don't build by default if used in a subproject #360

Merged
merged 2 commits into from
Dec 2, 2023

Conversation

v1993
Copy link
Contributor

@v1993 v1993 commented Dec 1, 2023

This allows to do the following in a project using cglm as a subproject and avoid building cglm's standalone library if you only use inline versions of functions:

cglm_dep = dependency(
  'cglm',
  default_options: [ 'install=false' ]
).partial_dependency(
  compile_args: true,
  includes: true,
)

# Needed since it's won't be pulled in automatically now
libm_dep = meson.get_compiler('c').find_library('m', required: false)

@recp
Copy link
Owner

recp commented Dec 2, 2023

@v1993 thanks for your contributions,

Should we add this to meson section of README, Docs to let users know how to use inline-only version of cglm ?

@v1993
Copy link
Contributor Author

v1993 commented Dec 2, 2023

I think a note in readme would be nice, yes. This works with system-wide cglm as well.

@recp recp merged commit 049db64 into recp:master Dec 2, 2023
32 of 49 checks passed
@recp
Copy link
Owner

recp commented Dec 2, 2023

@v1993 the PR is merged, thanks for your contributions 🚀

I think a note in readme would be nice, yes. This works with system-wide cglm as well.

I'll try to add if I dont forget but any updates to README & Docs to add this note would welcome too :)

@kzhsw
Copy link

kzhsw commented Dec 4, 2023

CI seems broken, any idea?

meson.build:93:11: ERROR: declare_dependency got unknown keyword arguments "build_by_default"

@v1993
Copy link
Contributor Author

v1993 commented Dec 4, 2023

CI seems broken, any idea?

meson.build:93:11: ERROR: declare_dependency got unknown keyword arguments "build_by_default"

That's what I get for making this PR from web interface and not double-checking 🤦. The new line was supposed to go in library call just above, not declare_dependency.

recp added a commit that referenced this pull request Dec 5, 2023
@recp
Copy link
Owner

recp commented Dec 5, 2023

abb71a8 should fix the issue, @v1993 right?

@v1993
Copy link
Contributor Author

v1993 commented Dec 5, 2023

abb71a8 should fix the issue, @v1993 right?

Yep, that seems to be correct. Thanks for getting this sorted out!

@recp
Copy link
Owner

recp commented Dec 5, 2023

@v1993 thanks 👍

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.

3 participants