diff options
author | Jonathon Anderson <anderson.jonathonm@gmail.com> | 2023-10-30 11:21:43 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2024-01-17 08:42:09 -0800 |
commit | 3a846ff409d93faf8b3c912ed3cdce6c49628f1d (patch) | |
tree | 431d56fda97f714fb2fc0b8a4d18c2d1852de83d /test cases | |
parent | 76ad5fe8d387638d21258177328763f05a0e95ae (diff) | |
download | meson-3a846ff409d93faf8b3c912ed3cdce6c49628f1d.zip meson-3a846ff409d93faf8b3c912ed3cdce6c49628f1d.tar.gz meson-3a846ff409d93faf8b3c912ed3cdce6c49628f1d.tar.bz2 |
tests: Also test implicit rpaths from dependencies
Meson will implicit rpaths when *.so/*.dll/etc. files are injected onto
the link line from pkg-config and (now) cmake dependencies.
Extend the "prebuilt shared" tests to test that these are added.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/unit/17 prebuilt shared/meson.build | 16 | ||||
-rw-r--r-- | test cases/unit/17 prebuilt shared/meson_options.txt | 3 |
2 files changed, 13 insertions, 6 deletions
diff --git a/test cases/unit/17 prebuilt shared/meson.build b/test cases/unit/17 prebuilt shared/meson.build index 7badcb7..5107fca 100644 --- a/test cases/unit/17 prebuilt shared/meson.build +++ b/test cases/unit/17 prebuilt shared/meson.build @@ -1,13 +1,17 @@ project('prebuilt shared library', 'c') -search_dir = get_option('search_dir') -if search_dir == 'auto' - search_dir = meson.current_source_dir() +if get_option('method') == 'find_library' + search_dir = get_option('search_dir') + if search_dir == 'auto' + search_dir = meson.current_source_dir() + endif + + cc = meson.get_compiler('c') + shlib = cc.find_library('alexandria', dirs : search_dir) +else + shlib = dependency('alexandria', method: get_option('method')) endif -cc = meson.get_compiler('c') -shlib = cc.find_library('alexandria', dirs : search_dir) - exe = executable('patron', 'patron.c', dependencies : shlib) test('visitation', exe) diff --git a/test cases/unit/17 prebuilt shared/meson_options.txt b/test cases/unit/17 prebuilt shared/meson_options.txt index 7876a6f..d9d0d67 100644 --- a/test cases/unit/17 prebuilt shared/meson_options.txt +++ b/test cases/unit/17 prebuilt shared/meson_options.txt @@ -1 +1,4 @@ +option('method', type : 'combo', + choices : ['find_library', 'pkg-config', 'cmake'], + value : 'find_library') option('search_dir', type : 'string', value : 'auto') |