From 12d1805f31a01d09edbd62aa1d4d883a9d1a20af Mon Sep 17 00:00:00 2001 From: BtbN Date: Thu, 9 Dec 2021 01:11:24 +0100 Subject: [PATCH] Separate Linux-Specific SDL cmake args --- scripts.d/50-sdl.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts.d/50-sdl.sh b/scripts.d/50-sdl.sh index ac6cae1..b281d10 100755 --- a/scripts.d/50-sdl.sh +++ b/scripts.d/50-sdl.sh @@ -13,12 +13,21 @@ ffbuild_dockerbuild() { mkdir build && cd build - cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \ - -DSDL_SHARED=OFF -DSDL_STATIC=ON -DSDL_STATIC_PIC=ON -DSDL_X11_SHARED=OFF \ - -DHAVE_XGENERICEVENT=TRUE -DSDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM=1 \ - .. + local mycmake=( + -DSDL_SHARED=OFF + -DSDL_STATIC=ON + -DSDL_STATIC_PIC=ON + ) - exit 1 + if [[ $TARGET == linux* ]]; then + mycmake+=( + -DSDL_X11_SHARED=OFF + -DHAVE_XGENERICEVENT=TRUE + -DSDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM=1 + ) + fi + + cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" "${mycmake[@]}" .. ninja -j$(nproc) ninja install