diff --git a/libfdt/meson.build b/libfdt/meson.build index 2ea1448..9d07c5f 100644 --- a/libfdt/meson.build +++ b/libfdt/meson.build @@ -34,19 +34,21 @@ libfdt = library( install: true, ) -libfdt_a = static_library( - 'fdt', sources, - install: true, -) +link_with = libfdt -libfdt_inc = include_directories('.') +if get_option('default_library') != 'static' + libfdt_a = static_library( + 'fdt', sources, + install: true, + ) -if static_build - link_with = libfdt_a -else - link_with = libfdt + if static_build + link_with = libfdt_a + endif endif +libfdt_inc = include_directories('.') + libfdt_dep = declare_dependency( include_directories: libfdt_inc, link_with: link_with,