Skip to content

Commit 4b9213d

Browse files
authored
add shared libraries to export-dev (#252)
1 parent 0460377 commit 4b9213d

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

meson/part/exports/copy-export.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ while [ "$#" -gt 0 ]; do
4444
staticlib)
4545
ar -t "$2" | xargs ar crs "${target_dir}/lib/$3"
4646
;;
47+
sharedlib)
48+
filename="$(basename "$2")"
49+
major_versioned_name="$3"
50+
# libfoo.so.5 -> libfoo.so (remove the last part delimited by dot)
51+
unversioned_name="${major_versioned_name%.[0-9]*}"
52+
cp -L "$2" "${target_dir}/lib/$filename"
53+
ln -s "$filename" "${target_dir}/lib/$major_versioned_name"
54+
ln -s "$filename" "${target_dir}/lib/$unversioned_name"
55+
;;
4756
include)
4857
mkdir -p "${target_dir}/include/$3"
4958
cp -r -L -t "${target_dir}/include/$3" "$2"/*

uspace/lib/dltest/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#
2828

2929
allow_shared = true
30+
3031
src = files(
3132
'dltest.c',
3233
)

uspace/lib/inet/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
#
2828

29+
allow_shared = true
30+
2931
src = files(
3032
'src/addr.c',
3133
'src/dhcp.c',

uspace/lib/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ foreach l : libs
287287
include_directories: includes,
288288
dependencies: _shared_deps,
289289
)
290+
exported_devel_files += [ 'sharedlib', _shared_lib, _libname ]
290291
endif
291292

292293
_static_lib = static_library(l, src,

uspace/lib/posix/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
includes += include_directories('include/posix', 'include')
3131
c_args += [ '-fno-builtin', '-D_XOPEN_SOURCE' ]
3232

33+
allow_shared = true
34+
3335
# TODO
3436

3537
src = files(

0 commit comments

Comments
 (0)