Skip to content
Snippets Groups Projects
Commit 68106d3f authored by Izzard, Robert Dr (Maths & Physics)'s avatar Izzard, Robert Dr (Maths & Physics)
Browse files

more cleanup of meson.build

parent bd37edf3
No related branches found
No related tags found
No related merge requests found
......@@ -841,6 +841,7 @@ endif
# (even in Linux) which means the linking fails.
#
binary_c_subdir_objects = []
binary_c_subdir_deps = []
src_subdirs = run_command('meson/source_directories.sh').stdout().strip().split('\n')
src_root_sourcefiles = run_command('meson/source_files.sh','./src').stdout().strip().split('\n')
......@@ -872,12 +873,11 @@ foreach src_subdir : src_subdirs
endif
#message('headers : ' + ' '.join(_sources))
# make the build target and append to binary_c_subdir_objects
binary_c_subdir_objects += build_target(
# add the library containing the compiled _sources
# to the dependency list
_lib = static_library(
_target_name,
build_by_default: false,
pic : true,
target_type : 'static_library',
pic: true,
sources : [
precompiled_headers,
_sources,
......@@ -888,11 +888,16 @@ foreach src_subdir : src_subdirs
cflags,
quoted_cflags_list,
],
link_language: 'c',
)
)
binary_c_subdir_deps += declare_dependency(
link_with: _lib
)
endif
endforeach
# add the subdir libraries to the main dependency list
dependencies += binary_c_subdir_deps
############################################################
#
# binary_c objects references all the binary_c_subdir_objects,
......@@ -923,11 +928,11 @@ binary_c_objects = build_target(
libs,
],
link_with : [
binary_c_subdir_objects,
],
link_language: 'c',
)
############################################################
#
# make shared library
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment