Browse Source

libfdt: rework shared/static libraries

Instead of creating 2 libraries manualy, just call both_libraries and
link to the appropriate one as requested.

Fixes compilation when passing -Ddefault_libraries=both as the
static_library name is duplicated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
Rosen Penev 8 months ago committed by David Gibson
parent
commit
da39ee0e68
  1. 17
      libfdt/meson.build

17
libfdt/meson.build

@ -26,7 +26,7 @@ else
endif endif


link_args += version_script link_args += version_script
libfdt = library( libfdt = both_libraries(
'fdt', sources, 'fdt', sources,
version: meson.project_version(), version: meson.project_version(),
link_args: link_args, link_args: link_args,
@ -34,17 +34,10 @@ libfdt = library(
install: true, install: true,
) )


link_with = libfdt if static_build

link_with = libfdt.get_static_lib()
if get_option('default_library') != 'static' else
libfdt_a = static_library( link_with = libfdt.get_shared_lib()
'fdt', sources,
install: true,
)

if static_build
link_with = libfdt_a
endif
endif endif


libfdt_inc = include_directories('.') libfdt_inc = include_directories('.')

Loading…
Cancel
Save