Commit Graph

18 Commits

Author SHA1 Message Date
Nirbheek Chauhan 577b6dfdf6 find_program: Find scripts without extensions on Windows
Because of how files and executables work on Windows, scripts that use
an interpreter must have an extension, and that extension must be
associated with an interpreter. The full list of executable extensions
is available in the PATHEXT environment variable.

However, UNIX-like OSes use an executable bit and read the shebang to
figure out what interpreter to use, and the scripts don't need to have
extensions. We can now detect these scripts using find_program by
manually searching in PATH and reading the shebang.
2016-07-30 15:20:01 +05:30
Nirbheek Chauhan baf8481c4f pkg-config: Print 'NO' when version is too old
This gives a clearer output when the dependency is not required or has a
fallback subproject otherwise the user is left wondering why the optional
dependency wasn't used or why the fallback subproject is being used.
2016-07-28 21:11:45 +05:30
Nirbheek Chauhan 48b4defa37 pkg-config: Move setting of cargs and libs to functions
Much cleaner this way. It's completely clear what each block of code does.
2016-07-28 21:06:00 +05:30
Nirbheek Chauhan bc63103ae0 pkg-config: Short-circuit when there's no pkg-config file found
Just exit immediately when there's no pkg-config file found instead of putting
everything else in a huge 'else:'. Much clearer and avoids one level of
indentation.

No code changes accompany this.
2016-07-28 21:02:02 +05:30
Thibault Saunier a23f577415 dependencies: Add a get_version method to Python3Dependency
Otherwise ninja files regeneration fails with:

  AttributeError: 'Python3Dependency' object has no attribute 'get_version'
2016-07-04 13:01:23 -04:00
Jussi Pakkanen 35eb8c7b9a Added version info to sdl2dep. Closes #616. 2016-06-24 15:45:25 +03:00
Nirbheek Chauhan cd509043e0 wxwidgets: Don't error out if dependency is not required (#606) 2016-06-21 00:16:11 +03:00
Jussi Pakkanen f9910d2c11 Ensure cargs and libs variables always exist. Closes #581. 2016-06-09 21:48:27 +03:00
Nirbheek Chauhan c33e7a68a1 Also reuse subproject-based fallback dependencies
This allows a project to use the same fallbacks dependency from the same
subproject multiple times in the same way that external dependencies can be.

Also change the format of the dependency identifier to ensure that fallback
checks with different dirname/varname aren't mistakenly reused. We now use
a tuple for this because the format is simpler to construct and it gives us the
same immutability guarantees as a string which is needed for using it as
a dictionary key.
2016-05-30 03:35:02 +05:30
Jussi Pakkanen cff4e7d299 Can query version strings of dependencies. 2016-05-29 03:15:16 +03:00
Hemmo Nieminen 336904b553 Move MesonException from coredata to mesonlib. 2016-04-01 00:52:45 +03:00
Jussi Pakkanen 8b6848ebc3 Add dir support for find_library and remove deprecated standalone version. Closes #450. 2016-03-17 20:55:19 +02:00
Jussi Pakkanen 6b548a1c75 Added find_library method and deprecated the standalone version. Closes #396. 2016-03-12 17:00:55 +02:00
Jussi Pakkanen 52b66edb6c Can specify compile and link args for internal deps. 2016-02-29 21:28:16 +02:00
Jussi Pakkanen a04c33e125 Can build Python extension on OSX. 2016-02-21 17:12:09 +02:00
Jussi Pakkanen 98d3fb5372 Extract python3 dependency information from the current process if it is not available in pkg-config. 2016-02-21 14:53:36 +02:00
Jussi Pakkanen 25793975d7 Can ask pkg-config to provide static libraries. Closes #380. 2016-02-14 20:13:17 +02:00
Jussi Pakkanen 23b98cd6e6 Renamed meson package to mesonbuild so that we can have a script named meson in the same toplevel dir. 2016-01-16 17:35:29 +02:00