8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
14 lines
552 B
Bash
14 lines
552 B
Bash
# Fix libtool libraries generated by qmake.
|
|
# qmake started inserting filenames of shared objects instead of the appropriate
|
|
# linker flags. fixQmakeLibtool searches for broken libtool libraries and
|
|
# replaces the filenames with the linker flags that should have been there.
|
|
fixQmakeLibtool() {
|
|
if [ -d "$1" ]; then
|
|
find "$1" -name '*.la' | while read la; do
|
|
sed -i "$la" \
|
|
-e '/^dependency_libs/ s,\(/[^ ]\+\)/lib\([^/ ]\+\)\.so,-L\1 -l\2,g'
|
|
done
|
|
fi
|
|
}
|
|
|
|
fixupOutputHooks+=('fixQmakeLibtool $prefix')
|