Commit Graph

7 Commits

Author SHA1 Message Date
Jon Turney 4fc1ca20b6 Fix incorrect checking of build machine for dependency availability
Don't check the build machine to determine a dependency whose availability
is static property of the host machine
2018-11-02 21:39:02 +02:00
Jon Turney 39d87269b3 Add missing reporting of some methods tried to find the dependency
Make us report 'system' and 'framework' when we tried those methods to
locate the dependency.
2018-09-10 21:02:18 +03:00
Jon Turney 6a4c2d63d7
Comparison with an unknown dependency version should always fail
Consistently use None to store an unknown dependency version (rather than
'none', 'unknown' or some made up version)
2018-08-26 17:23:39 +01:00
Jon Turney 921977589a
Set is_found in AppleFrameworks constructor
Set is_found in AppleFrameworks constructor, rather than overriding the
found() method, as other superclass methods may access is_found.
2018-08-26 17:23:39 +01:00
Nirbheek Chauhan d737488150 dependencies: Don't assume self.compiler is a C compiler
All dependencies were using find_library, has_header, get_define, etc on
self.compiler assuming that it's a compiler that outputs and consumes
C-like libraries. This is not true for D (and in the future, for Rust)
since although they can consume C libraries, they do not use the
C ecosystem.

For such purposes, we now have self.clib_compiler. Nothing uses
self.compiler anymore as a result, and it has been removed.
2018-06-20 11:27:08 +00:00
Nirbheek Chauhan 0c83f8352d dependencies: Add a new class ExternalDependency
This class now consolidates a lot of the logic that each external
dependency was duplicating in its class definition.

All external dependencies now set:

* self.version
* self.compile_args and self.link_args
* self.is_found (if found)
* self.sources
* etc

And the abstract ExternalDependency class defines the methods that
will fetch those properties. Some classes still override that for
various reasons, but those should also be migrated to properties as
far as possible.

Next step is to consolidate and standardize the way in which we call
'configuration binaries' such as sdl2-config, llvm-config, pkg-config,
etc. Currently each class has to duplicate code involved with that
even though the format is very similar.

Currently only pkg-config supports multiple version requirements, and
some classes don't even properly check the version requirement. That
will also become easier now.
2017-06-09 20:21:01 +05:30
Elliott Sales de Andrade cb24c2d58a Split apart platform-specific dependencies 2017-05-09 18:28:04 -04:00