Otherwise internal dependencies have auto-generated names that are not human readable. Instead, use the name that the dependency overrides. For example: ```meson meson.override_dependency('zlib', declare_dependency()) dep_zlib = dependency('zlib') assert(dep_zlib.name() == 'zlib') ``` Fixes: #12967pull/13709/head
parent
6e98767c31
commit
b7bf61e33e
7 changed files with 79 additions and 4 deletions
@ -0,0 +1,8 @@ |
||||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
* Copyright © 2024 Intel Corporation |
||||
*/ |
||||
|
||||
#include <zlib.h> |
||||
|
||||
int main(void) { return 0; } |
@ -0,0 +1,12 @@ |
||||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0 |
||||
* Copyright © 2024 Intel Corporation |
||||
*/ |
||||
|
||||
#include <zlib.h> |
||||
#include <string.h> |
||||
|
||||
int main(void) { |
||||
const char * zver = zlibVersion(); |
||||
return strcmp(zver, ZLIB_VERSION); |
||||
} |
@ -0,0 +1,17 @@ |
||||
# SPDX-License-Identifier: Apache-2.0 |
||||
# Copyright © 2024 Intel Corporation |
||||
|
||||
# TODO: don't use compile whenever we get includes and compile args separated |
||||
dep_zlib_sub = dep_zlib.partial_dependency(compile_args : true, includes : true) |
||||
|
||||
executable( |
||||
'zlib header only test', |
||||
'header_only.c', |
||||
dependencies : dep_zlib_sub, |
||||
) |
||||
|
||||
executable( |
||||
'zlib link test', |
||||
'link.c', |
||||
dependencies : [dep_zlib_sub, dep_zlib], |
||||
) |
Loading…
Reference in new issue