aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2018-12-09 09:30:54 +0100
committerXavier Claessens <xclaesse@gmail.com>2018-12-12 10:42:32 -0500
commit261ab9b2140005d4f7e42118ccb6598fa5b7f15d (patch)
tree67f3113b526ed2eb271e6de7d9e3f74f647b254a /test cases
parentf0ee06bdab658eb021b911ccffaad2ad31d3e900 (diff)
downloadmeson-261ab9b2140005d4f7e42118ccb6598fa5b7f15d.zip
meson-261ab9b2140005d4f7e42118ccb6598fa5b7f15d.tar.gz
meson-261ab9b2140005d4f7e42118ccb6598fa5b7f15d.tar.bz2
pkgconfig: Fix link order of library dependencies
Since `_process_libs` appends the lib's dependencies this list already, the final return value of `_process_libs` will end up after its dependencies, which is the wrong way around. (The lib must come first, then its dependencies) The easiest solution is to simply pre-pend the return value of `_process_libs` rather than appending it, so that its dependencies come after the library itself. Closes #4091.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/50 pkgconfig static link order/meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/test cases/unit/50 pkgconfig static link order/meson.build b/test cases/unit/50 pkgconfig static link order/meson.build
new file mode 100644
index 0000000..b61de9a
--- /dev/null
+++ b/test cases/unit/50 pkgconfig static link order/meson.build
@@ -0,0 +1,11 @@
+project('link order test', 'c')
+
+dep = library('dependency', [])
+lib = static_library('something', [], link_with: dep)
+
+import('pkgconfig').generate(
+ name: 'libsomething',
+ description: 'test library',
+ libraries: lib,
+ version: '1'
+)