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. 10
      libfdt/meson.build

10
libfdt/meson.build

@ -34,18 +34,20 @@ libfdt = library( @@ -34,18 +34,20 @@ libfdt = library(
install: true,
)

link_with = libfdt

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

libfdt_inc = include_directories('.')

if static_build
link_with = libfdt_a
else
link_with = libfdt
endif
endif

libfdt_inc = include_directories('.')

libfdt_dep = declare_dependency(
include_directories: libfdt_inc,

Loading…
Cancel
Save