mirror of
https://github.com/ThrowTheSwitch/Unity
synced 2025-05-31 03:49:33 -04:00
Updated sub meson script in example src.
Added foreach loop to avoid DRY, Put source files in map structors, fixed comment.
This commit is contained in:
parent
f2711a87a6
commit
964a58c053
@ -1,6 +1,6 @@
|
||||
###################################################################################
|
||||
# #
|
||||
# NAME: examples/example_4/src/meson.build #
|
||||
# NAME: meson.build #
|
||||
# #
|
||||
# AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. #
|
||||
# WRITTEN BY: Michael Brockus. #
|
||||
@ -9,23 +9,13 @@
|
||||
# #
|
||||
###################################################################################
|
||||
|
||||
inc_dir = include_directories('.')
|
||||
lib_list = {'a': ['ProductionCode.c' ], 'b': ['ProductionCode2.c']}
|
||||
|
||||
foreach lib, src : lib_list
|
||||
set_variable(lib + '_lib',
|
||||
static_library(lib + '_lib', sources: src, include_directories: inc_dir))
|
||||
endforeach
|
||||
|
||||
a_lib = library(
|
||||
'production-code-1',
|
||||
'ProductionCode.c',
|
||||
include_directories: example_dir)
|
||||
|
||||
b_lib = library(
|
||||
'production-code-2',
|
||||
'ProductionCode2.c',
|
||||
include_directories: example_dir)
|
||||
|
||||
|
||||
a_dep = declare_dependency(
|
||||
link_with: a_lib,
|
||||
include_directories: example_dir)
|
||||
|
||||
b_dep = declare_dependency(
|
||||
link_with: b_lib,
|
||||
include_directories: example_dir)
|
||||
a_dep = declare_dependency(link_with: a_lib, include_directories: inc_dir)
|
||||
b_dep = declare_dependency(link_with: b_lib, include_directories: inc_dir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user