Reduced lib build complecsity
This commit is contained in:
@@ -21,13 +21,7 @@ subdir('include')
|
||||
subdir('src')
|
||||
subdir('test')
|
||||
|
||||
if get_option('link_type') == 'static'
|
||||
chosen_lib = static_lib
|
||||
else
|
||||
chosen_lib = shared_lib
|
||||
endif
|
||||
|
||||
dep = declare_dependency(link_with : chosen_lib, include_directories : includes)
|
||||
dep = declare_dependency(link_with : lib, include_directories : includes)
|
||||
|
||||
cppcheck = custom_target(meson.project_name() + '_cppcheck_internal',
|
||||
output : meson.project_name() + '_cppcheck.log',
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
option('link_type', type : 'combo', choices : ['static', 'shared'], value : 'static')
|
||||
|
||||
@@ -13,5 +13,4 @@ sources += configure_file(output : 'config.cpp', input : 'config.cpp.in',
|
||||
'maintainer' : maintainer,
|
||||
})
|
||||
|
||||
static_lib = static_library(meson.project_name(), sources, include_directories : includes, install: true, dependencies: module_deps)
|
||||
shared_lib = shared_library(meson.project_name(), sources, include_directories : includes, install: true, dependencies: module_deps)
|
||||
lib = library(meson.project_name(), sources, include_directories : includes, install: true, dependencies: module_deps)
|
||||
|
||||
@@ -6,6 +6,6 @@ test_files = []
|
||||
|
||||
foreach test_name : test_names
|
||||
test_files += files(test_name + '.cpp')
|
||||
test_exe = executable(test_name + '.test', test_files[-1], link_with : static_lib, include_directories : [includes, src], dependencies : module_deps)
|
||||
test_exe = executable(test_name + '.test', test_files[-1], link_with : lib, include_directories : [includes, src], dependencies : module_deps)
|
||||
test(test_name, test_exe, suite : 'regular')
|
||||
endforeach
|
||||
|
||||
Reference in New Issue
Block a user