Support for disabling optional dependencies even if they can be found.
See original GitHub issuemore precise description in: https://github.com/mesonbuild/meson/issues/8224#issuecomment-763809674
continuation of #2452
Seems like this is not solved. #2411 was closed and not merged.
Even with #3376 it actually requires meson.build
to do the correct thing (which it often does not or the build script is a mix of correct and wrong).
You probably want to have a look at CMAKE_DISABLE_FIND_PACKAGE_<PackageName>
from CMake to actually learn from it.
On a different but related issue: I also saw people suggesting/looking for something like <PackageName>_DIR
from CMake
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (20 by maintainers)
Top Results From Across the Web
Maven – Optional Dependencies and Dependency Exclusions
This section discusses optional dependencies and dependency exclusions. This will help users to understand what they are and when and how to use...
Read more >Optional dependencies don't work (2019) - Michael Stapelberg
I'm not saying optional dependencies should never be used. In fact, for bootstrapping, disabling dependencies can save a lot of work and can ......
Read more >Disable optional dependency installation in ocaml opam
If the optional dependency changes the core behavior of your package, i.e., if it is not an extension, but a modification, then it...
Read more >Optional dependency in library generates `undefined ...
Public functionality (that would be exposed in docs) should always work, even if the optional dependencies aren't there, so you shouldn't run ...
Read more >The Java Library Plugin - Gradle User Manual
If your build consumes a published module with POM metadata, the Java and ... This section will help you identify API and Implementation...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, if I understand correctly, the main issue here is that some projects do stuff like:
If this is the case, I would suggest trying to find a solution for this particular use case, instead of arguing why/if exactly,
CMAKE_DISABLE_FIND_PACKAGE
is bad. Also, we could argue if we want to actually do something about this / if we actually recognize this as a problem. Debating some CMake design decisions won’t be to anyone’s benefit.I have actually, for real, told people “cmake sucks, don’t use cmake. Cmake lets you do nonsense like DISABLE_FIND_PACKAGE instead of proper options. Use meson instead.”
It would feel pretty weird to me if meson then went around and added support for this misfeature.