Fix building with cmake 4.x on Arch (#9644)
Some checks failed
Build all / Build All (push) Has been cancelled
Build all / Flatpak (push) Has been cancelled

* Fix CMAKE version check to only apply to Windows

* Treat arch-based distros as arch when building

* Fix cmake policy version issue on Arch

* Remove duplicate cmake minimum version check

* Move cmake 4.x compatibility fix to BuildLinux.sh
This commit is contained in:
Maciej Lisiewski 2025-05-17 17:36:39 +02:00 committed by GitHub
parent 778deab033
commit c6b8664c8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 8 deletions

View file

@ -84,6 +84,10 @@ then
exit 0
fi
# cmake 4.x compatibility workaround
export CMAKE_POLICY_VERSION_MINIMUM=3.5
DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '"')
DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"')
# Check for direct distribution match to Ubuntu/Debian
@ -92,6 +96,8 @@ if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ]; th
# Check if distribution is Debian/Ubuntu-like based on ID_LIKE
elif [[ "${DISTRIBUTION_LIKE}" == *"debian"* ]] || [[ "${DISTRIBUTION_LIKE}" == *"ubuntu"* ]]; then
DISTRIBUTION="debian"
elif [[ "${DISTRIBUTION_LIKE}" == *"arch"* ]]; then
DISTRIBUTION="arch"
fi
if [ ! -f ./linux.d/${DISTRIBUTION} ]
then