Switch frei0r to "cmake"

This commit is contained in:
BtbN 2023-02-12 17:11:50 +01:00
parent 3183ec99b3
commit 74a2af1977

View file

@ -13,29 +13,17 @@ ffbuild_dockerbuild() {
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT" frei0r
cd frei0r
./autogen.sh
mkdir build && cd build
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-shared
--enable-static
--with-pic
--enable-cpuflags
)
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" ..
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
mkdir -p "$FFBUILD_PREFIX"/lib/pkgconfig
cp frei0r.pc "$FFBUILD_PREFIX"/lib/pkgconfig
./configure "${myconf[@]}"
make -C include -j$(nproc)
make -C include install
make install-pkgconfigDATA
mkdir -p "$FFBUILD_PREFIX"/include
cp ../include/frei0r.h "$FFBUILD_PREFIX"/include
cat frei0r.pc
}
ffbuild_configure() {