mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2025-04-04 02:15:21 +00:00
config/functions: factor out pkg-config setup into functions
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
committed by
MilhouseVH
parent
a9bb23f191
commit
142f59ab2c
@ -175,6 +175,24 @@ flag_enabled() {
|
||||
fi
|
||||
}
|
||||
|
||||
setup_pkg_config_target() {
|
||||
export PKG_CONFIG="$TOOLCHAIN/bin/pkg-config"
|
||||
export PKG_CONFIG_PATH=""
|
||||
export PKG_CONFIG_LIBDIR="$SYSROOT_PREFIX/usr/lib/pkgconfig:$SYSROOT_PREFIX/usr/share/pkgconfig"
|
||||
export PKG_CONFIG_SYSROOT_DIR="$SYSROOT_PREFIX"
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
|
||||
}
|
||||
|
||||
setup_pkg_config_host() {
|
||||
export PKG_CONFIG="$TOOLCHAIN/bin/pkg-config"
|
||||
export PKG_CONFIG_PATH=""
|
||||
export PKG_CONFIG_LIBDIR="$TOOLCHAIN/lib/pkgconfig:$TOOLCHAIN/share/pkgconfig"
|
||||
export PKG_CONFIG_SYSROOT_DIR=""
|
||||
unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
|
||||
unset PKG_CONFIG_ALLOW_SYSTEM_LIBS
|
||||
}
|
||||
|
||||
setup_toolchain() {
|
||||
if [ "$LTO_SUPPORT" = "yes" ]; then
|
||||
if flag_enabled "lto-parallel" "no"; then
|
||||
@ -256,12 +274,7 @@ setup_toolchain() {
|
||||
export CFLAGS="$TARGET_CFLAGS"
|
||||
export CXXFLAGS="$TARGET_CXXFLAGS"
|
||||
export LDFLAGS="$TARGET_LDFLAGS"
|
||||
export PKG_CONFIG="$TOOLCHAIN/bin/pkg-config"
|
||||
export PKG_CONFIG_PATH=""
|
||||
export PKG_CONFIG_LIBDIR="$SYSROOT_PREFIX/usr/lib/pkgconfig:$SYSROOT_PREFIX/usr/share/pkgconfig"
|
||||
export PKG_CONFIG_SYSROOT_DIR="$SYSROOT_PREFIX"
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
|
||||
export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
|
||||
setup_pkg_config_target
|
||||
export CMAKE_CONF=$TOOLCHAIN/etc/cmake-$TARGET_NAME.conf
|
||||
export CMAKE="cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF -DCMAKE_INSTALL_PREFIX=/usr"
|
||||
if [ ! -f $CMAKE_CONF ] ; then
|
||||
@ -308,12 +321,7 @@ setup_toolchain() {
|
||||
export CFLAGS="$HOST_CFLAGS"
|
||||
export CXXFLAGS="$HOST_CXXFLAGS"
|
||||
export LDFLAGS="$HOST_LDFLAGS"
|
||||
export PKG_CONFIG="$TOOLCHAIN/bin/pkg-config"
|
||||
export PKG_CONFIG_PATH=""
|
||||
export PKG_CONFIG_LIBDIR="$TOOLCHAIN/lib/pkgconfig:$TOOLCHAIN/share/pkgconfig"
|
||||
export PKG_CONFIG_SYSROOT_DIR=""
|
||||
unset PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
|
||||
unset PKG_CONFIG_ALLOW_SYSTEM_LIBS
|
||||
setup_pkg_config_host
|
||||
export CMAKE_CONF=$TOOLCHAIN/etc/cmake-$HOST_NAME.conf
|
||||
export CMAKE="cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF -DCMAKE_INSTALL_PREFIX=$TOOLCHAIN"
|
||||
if [ ! -f $CMAKE_CONF ] ; then
|
||||
|
Reference in New Issue
Block a user