diff options
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | src/meson.build | 33 | ||||
-rw-r--r-- | tests/meson.build | 14 | ||||
-rw-r--r-- | tools/meson.build | 8 |
4 files changed, 28 insertions, 31 deletions
diff --git a/meson.build b/meson.build index b5ee763..1bf915e 100644 --- a/meson.build +++ b/meson.build @@ -86,9 +86,11 @@ endif # On Windows, we use a compatibility layer to emulate pthread if host_machine.system() == 'windows' - thread_dependency = declare_dependency(sources : files('src/win32/thread.c')) + thread_dependency = [] + thread_compat_dep = declare_dependency(sources : files('src/win32/thread.c')) else thread_dependency = dependency('threads') + thread_compat_dep = [] endif diff --git a/src/meson.build b/src/meson.build index c7ce41c..e4cfcff 100644 --- a/src/meson.build +++ b/src/meson.build @@ -171,10 +171,14 @@ foreach bitdepth : dav1d_bitdepths ).extract_all_objects() endforeach -# Static private helper library -# This is primarily needed to link with tests so that -# the tests can use all symbols, even the non-exported. -libdav1d_private = static_library('dav1d_private', +# The final dav1d library +if host_machine.system() == 'windows' + dav1d_soversion = '' +else + dav1d_soversion = dav1d_version_major +endif + +libdav1d = library('dav1d', libdav1d_sources, libdav1d_nasm_objs, libdav1d_rc_obj, @@ -185,24 +189,13 @@ libdav1d_private = static_library('dav1d_private', ], include_directories : dav1d_inc_dirs, - dependencies : [stdatomic_dependency], + dependencies : [ + stdatomic_dependency, + thread_dependency, + thread_compat_dep, + ], c_args : [stackalign_flag], - install : false, - build_by_default : false, -) - -# The final dav1d library -if host_machine.system() == 'windows' - dav1d_soversion = '' -else - dav1d_soversion = dav1d_version_major -endif - -libdav1d = library('dav1d', version : meson.project_version(), - link_whole : libdav1d_private, - dependencies : thread_dependency, - include_directories : dav1d_inc_dirs, soversion : dav1d_soversion, install : true, ) diff --git a/tests/meson.build b/tests/meson.build index 2759367..2a13f3b 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -58,12 +58,20 @@ if is_asm_enabled checkasm_nasm_objs = nasm_gen.process(files('checkasm/x86/checkasm.asm')) endif - checkasm = executable('checkasm', checkasm_sources, checkasm_nasm_objs, - objects: [checkasm_bitdepth_objs], + checkasm = executable('checkasm', + checkasm_sources, + checkasm_nasm_objs, + libdav1d_nasm_objs, + + objects: [ + checkasm_bitdepth_objs, + libdav1d.extract_all_objects(recursive: true), + ], + include_directories: dav1d_inc_dirs, - link_with: libdav1d_private, c_args: [stackalign_flag, stackrealign_flag], build_by_default: false, + dependencies : [thread_dependency], ) test('checkasm test', checkasm) diff --git a/tools/meson.build b/tools/meson.build index 561825d..c9fbc89 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -43,17 +43,11 @@ dav1d_sources = files( 'output/yuv.c', ) -if host_machine.system() == 'windows' - dav1d_link_with_lib = libdav1d_private -else - dav1d_link_with_lib = libdav1d -endif - dav1d = executable('dav1d', dav1d_sources, rev_target, - link_with : dav1d_link_with_lib, + link_with : libdav1d, include_directories : [dav1d_inc_dirs], dependencies : [getopt_dependency, thread_dependency], install : true, |