mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-14 05:06:54 +03:00
Try fix CI.
This commit is contained in:
16
premake4.lua
16
premake4.lua
@@ -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()
|
||||
|
||||
|
||||
21
premake5.lua
21
premake5.lua
@@ -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
|
||||
|
||||
|
||||
@@ -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 .
|
||||
|
||||
Reference in New Issue
Block a user