diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-01-06 15:36:45 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-01-08 10:04:42 -0800 |
| commit | 55e3a5ece5d90ea29dcb8ab2d0bb6898a71e8971 (patch) | |
| tree | cdf1d0214f5fac25f65dd111c6baf7c7fec0b10e /mesonbuild/templates/objctemplates.py | |
| parent | 484ac23b512f2ccc008ad9b9520016fbaa3645f0 (diff) | |
| download | meson-55e3a5ece5d90ea29dcb8ab2d0bb6898a71e8971.tar.gz | |
templates: plumb dependencies into the new project template
The command line value exists, and we'll want it soon.
Diffstat (limited to 'mesonbuild/templates/objctemplates.py')
| -rw-r--r-- | mesonbuild/templates/objctemplates.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/templates/objctemplates.py b/mesonbuild/templates/objctemplates.py index 64141e456..30f480424 100644 --- a/mesonbuild/templates/objctemplates.py +++ b/mesonbuild/templates/objctemplates.py @@ -60,6 +60,9 @@ lib_objc_meson_template = '''project( default_options : ['warning_level=3'], ) +dependencies = [{dependencies} +] + # These arguments are only used to build the shared library # not the executables that use the library. lib_args = ['-DBUILDING_{utoken}'] @@ -69,18 +72,21 @@ shlib = shared_library( '{source_file}', install : true, objc_args : lib_args, + dependencies : dependencies, gnu_symbol_visibility : 'hidden', ) test_exe = executable( '{test_exe_name}', '{test_source_file}', + dependencies : dependencies, link_with : shlib) test('{test_name}', test_exe) # Make this library usable as a Meson subproject. {ltoken}_dep = declare_dependency( include_directories : include_directories('.'), + dependencies : dependencies, link_with : shlib, ) @@ -121,9 +127,13 @@ hello_objc_meson_template = '''project( default_options : ['warning_level=3'], ) +dependencies = [{dependencies} +] + exe = executable( '{exe_name}', '{source_name}', + dependencies : dependencies, install : true, ) |
