-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkgconfig: add support to override pkg-config
- Loading branch information
Showing
7 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
project('override pkg-config', 'c') | ||
|
||
subproject('pkg-config') | ||
|
||
pkgconfig = find_program('pkg-config') | ||
|
||
# This dependency can only be found if pkg-config is overridden with our custom pkg-config.py | ||
gobj = dependency('test-package-0.0', version : '= 0.0.0') |
5 changes: 5 additions & 0 deletions
5
test cases/common/279 pkgconfig override/subprojects/pkg-config.wrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[wrap-file] | ||
directory = pkg-config | ||
|
||
[provide] | ||
program_names = pkg-config |
13 changes: 13 additions & 0 deletions
13
test cases/common/279 pkgconfig override/subprojects/pkg-config/bin/pkg-config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sys | ||
|
||
if len(sys.argv) > 1: | ||
if sys.argv[1] == "--modversion": | ||
if sys.argv[2] == "test-package-0.0": | ||
print("0.0.0") | ||
else: | ||
exit(-1) | ||
elif sys.argv[1] == "--version": | ||
print("0.0.0") | ||
exit(0) |
4 changes: 4 additions & 0 deletions
4
test cases/common/279 pkgconfig override/subprojects/pkg-config/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
project('pkg-config') | ||
|
||
pkgconfig = find_program(meson.project_source_root() / 'bin' / 'pkg-config.py') | ||
meson.override_find_program('pkg-config', pkgconfig) |