mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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>
This commit is contained in:
parent
a669223f7a
commit
da39ee0e68
1 changed files with 5 additions and 12 deletions
|
@ -26,7 +26,7 @@ else
|
|||
endif
|
||||
|
||||
link_args += version_script
|
||||
libfdt = library(
|
||||
libfdt = both_libraries(
|
||||
'fdt', sources,
|
||||
version: meson.project_version(),
|
||||
link_args: link_args,
|
||||
|
@ -34,17 +34,10 @@ libfdt = library(
|
|||
install: true,
|
||||
)
|
||||
|
||||
link_with = libfdt
|
||||
|
||||
if get_option('default_library') != 'static'
|
||||
libfdt_a = static_library(
|
||||
'fdt', sources,
|
||||
install: true,
|
||||
)
|
||||
|
||||
if static_build
|
||||
link_with = libfdt_a
|
||||
endif
|
||||
if static_build
|
||||
link_with = libfdt.get_static_lib()
|
||||
else
|
||||
link_with = libfdt.get_shared_lib()
|
||||
endif
|
||||
|
||||
libfdt_inc = include_directories('.')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue