aboutsummaryrefslogtreecommitdiffstats
path: root/taglib-config.cmake
diff options
context:
space:
mode:
authorUrs Fleisch <ufleisch@users.sourceforge.net>2021-03-01 17:37:15 +0100
committerUrs Fleisch <ufleisch@users.sourceforge.net>2021-03-06 14:52:25 +0100
commit932d45259cf0859b44c5b36e048092581ded0dd7 (patch)
tree80fe7d534ff36006548aa8da226d9161b9bcf3d8 /taglib-config.cmake
parent844f07d32d10a208c93fa7b926b01f5475aac3ea (diff)
Fix taglib-config for cross compiling (#998)
Diffstat (limited to 'taglib-config.cmake')
-rw-r--r--taglib-config.cmake20
1 files changed, 15 insertions, 5 deletions
diff --git a/taglib-config.cmake b/taglib-config.cmake
index 9f251178..ec0834ab 100644
--- a/taglib-config.cmake
+++ b/taglib-config.cmake
@@ -14,10 +14,20 @@ EOH
exit 1;
}
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+# Looks useless as it is, but could be replaced with a "pcfiledir" by Buildroot.
+prefix=
+exec_prefix=
+
+if test -z "$prefix"; then
+ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+else
+ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+fi
+if test -z "$exec_prefix"; then
+ libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+else
+ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+fi
flags=""
@@ -38,7 +48,7 @@ do
echo @TAGLIB_LIB_VERSION_STRING@
;;
--prefix)
- echo $prefix
+ echo ${prefix:-@CMAKE_INSTALL_PREFIX@}
;;
*)
echo "$0: unknown option $1"