mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Commit d4c938cbc7
is about fixing taglib-config for proper cross-compilation. The fix is right in principle, but wrong about adding `CMAKE_SYSROOT`. The correct prefix path should be set outside of the config file as some embedded Linux distros like OpenWrt or OpenEmbedded install with a different DESTDIR, and dependent packages see a different sysroot.
56 lines
662 B
CMake
56 lines
662 B
CMake
#!/bin/sh
|
|
|
|
usage()
|
|
{
|
|
echo "usage: $0 [OPTIONS]"
|
|
cat << EOH
|
|
|
|
options:
|
|
[--libs]
|
|
[--cflags]
|
|
[--version]
|
|
[--prefix]
|
|
EOH
|
|
exit 1;
|
|
}
|
|
|
|
prefix=@CMAKE_INSTALL_PREFIX@
|
|
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
|
libdir=${exec_prefix}/lib
|
|
includedir=${prefix}/include
|
|
|
|
flags=""
|
|
|
|
if test $# -eq 0 ; then
|
|
usage
|
|
fi
|
|
|
|
while test $# -gt 0
|
|
do
|
|
case $1 in
|
|
--libs)
|
|
flags="$flags -L$libdir -ltag"
|
|
;;
|
|
--cflags)
|
|
flags="$flags -I$includedir/taglib"
|
|
;;
|
|
--version)
|
|
echo @TAGLIB_LIB_VERSION_STRING@
|
|
;;
|
|
--prefix)
|
|
echo $prefix
|
|
;;
|
|
*)
|
|
echo "$0: unknown option $1"
|
|
echo
|
|
usage
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
if test -n "$flags"
|
|
then
|
|
echo $flags
|
|
fi
|