Try again.

This commit is contained in:
Martín Lucas Golini
2024-10-01 00:43:15 -03:00
parent 247f9cb8bf
commit 5e97fcf4ef
2 changed files with 23 additions and 5 deletions

View File

@@ -560,9 +560,14 @@ end
function set_apple_config()
if is_xcode() or _OPTIONS["use-frameworks"] then
linkoptions { "-F /Library/Frameworks" }
buildoptions { "-F /Library/Frameworks" }
incdirs { "/Library/Frameworks/SDL2.framework/Headers" }
linkoptions { "-F /Library/Frameworks", "src/thirdparty" }
buildoptions { "-F /Library/Frameworks", "src/thirdparty" }
local sdl2local = _MAIN_SCRIPT_DIR .. "src/thirdparty/SDL2.framework";
if os.isdir(sdl2local) then
incdirs { sdl2local .. "/Headers" }
else
incdirs { "/Library/Frameworks/SDL2.framework/Headers" }
end
end
if os.istarget("macosx") then
defines { "EE_SDL2_FROM_ROOTPATH" }

View File

@@ -21,13 +21,26 @@ for i in "$@"; do
done
SDL2_CONFIG=$(which sdl2-config)
CONFIG_NAME=
if command -v premake4 &> /dev/null
then
CONFIG_NAME=release
elif command -v premake5 &> /dev/null
then
CONFIG_NAME=release_arm64
else
echo "Neither premake5 nor premake4 is available. Please install one."
exit 1
fi
rm -rf ../../../libs/macosx
if [ -z $SDL2_CONFIG ]; then
echo "Building using frameworks"
../make.sh config=release ecode || exit
../make.sh config=$CONFIG_NAME ecode || exit
else
echo "Building using sdl2-config"
../make_no_fw.sh config=release ecode || exit
../make_no_fw.sh config=$CONFIG_NAME ecode || exit
fi
rm -rf ./ecode.app