Try fix CI.

This commit is contained in:
Martín Lucas Golini
2024-04-25 19:18:46 -03:00
parent fa580caa00
commit 7f92fea3dc
3 changed files with 29 additions and 10 deletions

View File

@@ -364,7 +364,7 @@ function build_base_configuration( package_name )
end
set_ios_config()
set_xcode_config()
set_apple_config()
build_arch_configuration()
configuration "debug"
@@ -409,7 +409,7 @@ function build_base_cpp_configuration( package_name )
end
set_ios_config()
set_xcode_config()
set_apple_config()
build_arch_configuration()
if _OPTIONS["with-static-eepp"] then
@@ -585,7 +585,7 @@ function build_link_configuration( package_name, use_ee_icon )
end
set_ios_config()
set_xcode_config()
set_apple_config()
build_arch_configuration()
configuration "debug"
@@ -786,12 +786,18 @@ function add_sdl2()
end
end
function set_xcode_config()
function set_apple_config()
if is_xcode() or _OPTIONS["use-frameworks"] then
linkoptions { "-F /Library/Frameworks" }
buildoptions { "-F /Library/Frameworks" }
includedirs { "/Library/Frameworks/SDL2.framework/Headers" }
end
if os.is("macosx") then
defines { "EE_SDL2_FROM_ROOTPATH" }
if not is_xcode() and not _OPTIONS["use-frameworks"] then
local sdl2flags = popen("sdl2-config --cflags"):gsub("\n", "")
buildoptions { sdl2flags }
end
end
end
@@ -935,7 +941,7 @@ function build_eepp( build_name )
set_macos_and_ios_config()
set_ios_config()
set_xcode_config()
set_apple_config()
add_static_links()

View File

@@ -147,6 +147,13 @@ function incdirs( dirs )
includedirs { dirs }
end
function popen( executable_path )
local handle = io.popen(executable_path)
local result = handle:read("*a")
handle:close()
return result
end
function download_and_extract_sdl(sdl_url)
print("Downloading: " .. sdl_url)
local dest_dir = "src/thirdparty/"
@@ -212,7 +219,7 @@ function build_base_configuration( package_name )
incdirs { "src/thirdparty/zlib" }
set_ios_config()
set_xcode_config()
set_apple_config()
build_arch_configuration()
filter "not system:windows"
@@ -245,7 +252,7 @@ function build_base_cpp_configuration( package_name )
end
set_ios_config()
set_xcode_config()
set_apple_config()
build_arch_configuration()
if _OPTIONS["with-static-eepp"] then
@@ -315,7 +322,7 @@ function build_link_configuration( package_name, use_ee_icon )
cppdialect "C++17"
set_ios_config()
set_xcode_config()
set_apple_config()
build_arch_configuration()
filter { "system:linux or system:macosx or system:haiku or system:bsd", "action:not vs*" }
@@ -533,12 +540,18 @@ function add_sdl2()
table.insert( backends, "SDL2" )
end
function set_xcode_config()
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" }
end
if os.istarget("macosx") then
defines { "EE_SDL2_FROM_ROOTPATH" }
if not is_xcode() and not _OPTIONS["use-frameworks"] then
local sdl2flags = popen("sdl2-config --cflags"):gsub("\n", "")
buildoptions { sdl2flags }
end
end
end

View File

@@ -5,7 +5,7 @@ premake4 --file=../../premake4.lua --disable-static-build gmake
cd ../../make/macosx/
sed -e "s/-Wl,-x//g" -i .make
make -j$(sysctl -n hw.ncpu) $@
make -j$(sysctl -n hw.ncpu) -e verbose=true $@
cd ../../bin/
ln -sf ../libs/macosx/libeepp.dylib .