Allow static building with meson

Added "static-build" option in the meson_options.txt.
Setting it to "true" allows static building.

Signed-off-by: Tero Tervala <tero.tervala@unikie.com>
Message-Id: <20220629163557.932298-1-tero.tervala@unikie.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Tero Tervala 2022-06-29 19:35:57 +03:00 committed by David Gibson
parent fd9b8c96c7
commit 7ad60734b1
4 changed files with 28 additions and 5 deletions

View file

@ -31,9 +31,15 @@ libfdt_a = static_library(
libfdt_inc = include_directories('.')
if static_build
link_with = libfdt_a
else
link_with = libfdt
endif
libfdt_dep = declare_dependency(
include_directories: libfdt_inc,
link_with: libfdt,
link_with: link_with,
)
install_headers(