Updated build_sokol_library.sh for mac support

This commit is contained in:
2024-10-19 12:40:06 -04:00
parent a62e996943
commit 988aa5efee

View File

@@ -36,6 +36,13 @@ fi
pushd "$path_sokol"
# Detect the operating system
OS=$(uname -s)
case "$OS" in
Linux*)
echo "Detected Linux operating system"
# Check for OpenGL and X11 development libraries
check_and_install() {
if ! dpkg -s $1 &> /dev/null; then
echo "$1 not found. Attempting to install..."
@@ -46,8 +53,7 @@ check_and_install() {
fi
fi
}
# Check for OpenGL and X11 development libraries
# Uncomment these lines if you need to install these dependencies
# check_and_install libgl1-mesa-dev
# check_and_install libx11-dev
# check_and_install libxcursor-dev
@@ -56,7 +62,20 @@ check_and_install() {
# check_and_install libxi-dev
# check_and_install libasound2-dev # ALSA development library
# Run the build script
echo "Running Linux build script..."
./build_clibs_linux.sh
;;
Darwin*)
echo "Detected macOS operating system"
echo "Running macOS build script..."
./build_clibs_macos.sh
;;
*)
echo "Unsupported operating system: $OS"
exit 1
;;
esac
popd
echo "Build process completed."