Browse Source

libfdt: fix duplicate meson target

If default_library is set to static, the libfdt target (which just
uses library()) is already static, so we should just use that.

This fixes this Meson error:

	libfdt/meson.build:37:11: ERROR: Tried to create target "fdt", but a target of that name already exists.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-ID: <20240123130742.185409-1-hi@alyssa.is>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
Alyssa Ross 10 months ago committed by David Gibson
parent
commit
3fbfdd08af
  1. 20
      libfdt/meson.build

20
libfdt/meson.build

@ -34,19 +34,21 @@ libfdt = library(
install: true, install: true,
) )


libfdt_a = static_library( link_with = libfdt
'fdt', sources,
install: true,
)


libfdt_inc = include_directories('.') if get_option('default_library') != 'static'
libfdt_a = static_library(
'fdt', sources,
install: true,
)


if static_build if static_build
link_with = libfdt_a link_with = libfdt_a
else endif
link_with = libfdt
endif endif


libfdt_inc = include_directories('.')

libfdt_dep = declare_dependency( libfdt_dep = declare_dependency(
include_directories: libfdt_inc, include_directories: libfdt_inc,
link_with: link_with, link_with: link_with,

Loading…
Cancel
Save