From c211fea51389728783cf59ae41156a5e0de9c41a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 22 Mar 2021 15:25:29 -0700 Subject: Refactor Qt Dependency into proper split classes with factories Currently the Qt Dependencies still use the old "combined" method for dependencies with multiple ways to be found. This is problematic as it means that `get_variable()` and friends don't work, as the dependency can't implement any of those methods. The correct solution is to make use of multiple Dependency instances, and a factory to tie them together. This does that. To handle QMake, I've leveraged the existing config-tool mechanism, which allows us to save a good deal of code, and use well tested code instead of rolling more of our own code. The one thing this doesn't do, but we probably should, is expose the macOS ExtraFrameworks directly, instead of forcing them to be found through QMake. That is a problem for another series, and someone who cares more about macOS than I do. --- docs/markdown/snippets/qt_factory.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/markdown/snippets/qt_factory.md (limited to 'docs/markdown') diff --git a/docs/markdown/snippets/qt_factory.md b/docs/markdown/snippets/qt_factory.md new file mode 100644 index 0000000..11cc783 --- /dev/null +++ b/docs/markdown/snippets/qt_factory.md @@ -0,0 +1,6 @@ +## Qt Dependency uses a Factory + +This separates the Pkg-config and QMake based discovery methods into two +distinct classes in the backend. This allows using +`dependency.get_variable()` and `dependency.get_pkg_config_variable()`, as +well as being a cleaner implementation. -- cgit v1.1