[Build] Make premake-androidmk generate something

This commit is contained in:
Triang3l 2020-11-21 17:14:40 +03:00
parent 7cb3cc3564
commit 2f247e0f9e
5 changed files with 54 additions and 19 deletions

3
.gitmodules vendored
View File

@ -67,3 +67,6 @@
[submodule "third_party/premake-cmake"] [submodule "third_party/premake-cmake"]
path = third_party/premake-cmake path = third_party/premake-cmake
url = https://github.com/Enhex/premake-cmake.git url = https://github.com/Enhex/premake-cmake.git
[submodule "third_party/premake-androidmk"]
path = third_party/premake-androidmk
url = https://github.com/Meoo/premake-androidmk.git

View File

@ -1,6 +1,9 @@
include("tools/build") include("tools/build")
require("third_party/premake-export-compile-commands/export-compile-commands") require("third_party/premake-export-compile-commands/export-compile-commands")
require("third_party/premake-cmake/cmake") require("third_party/premake-cmake/cmake")
-- gmake required for androidmk.
require("gmake")
require("third_party/premake-androidmk/androidmk")
location(build_root) location(build_root)
targetdir(build_bin) targetdir(build_bin)
@ -194,18 +197,23 @@ end
solution("xenia") solution("xenia")
uuid("931ef4b0-6170-4f7a-aaf2-0fece7632747") uuid("931ef4b0-6170-4f7a-aaf2-0fece7632747")
startproject("xenia-app") startproject("xenia-app")
architecture("x86_64") if os.istarget("android") then
if os.istarget("linux") then architecture("ARM64")
platforms({"Linux"}) platforms({"Android"})
elseif os.istarget("windows") then else
platforms({"Windows"}) architecture("x86_64")
-- 10.0.15063.0: ID3D12GraphicsCommandList1::SetSamplePositions. if os.istarget("linux") then
-- 10.0.19041.0: D3D12_HEAP_FLAG_CREATE_NOT_ZEROED. platforms({"Linux"})
filter("action:vs2017") elseif os.istarget("windows") then
systemversion("10.0.19041.0") platforms({"Windows"})
filter("action:vs2019") -- 10.0.15063.0: ID3D12GraphicsCommandList1::SetSamplePositions.
systemversion("10.0") -- 10.0.19041.0: D3D12_HEAP_FLAG_CREATE_NOT_ZEROED.
filter({}) filter("action:vs2017")
systemversion("10.0.19041.0")
filter("action:vs2019")
systemversion("10.0")
filter({})
end
end end
configurations({"Checked", "Debug", "Release"}) configurations({"Checked", "Debug", "Release"})
@ -220,18 +228,15 @@ solution("xenia")
include("third_party/imgui.lua") include("third_party/imgui.lua")
include("third_party/libav.lua") include("third_party/libav.lua")
include("third_party/mspack.lua") include("third_party/mspack.lua")
include("third_party/SDL2.lua")
include("third_party/snappy.lua") include("third_party/snappy.lua")
include("third_party/spirv-tools.lua") include("third_party/spirv-tools.lua")
include("third_party/volk.lua") include("third_party/volk.lua")
include("third_party/xxhash.lua") include("third_party/xxhash.lua")
include("src/xenia") include("src/xenia")
include("src/xenia/app")
include("src/xenia/app/discord") include("src/xenia/app/discord")
include("src/xenia/apu") include("src/xenia/apu")
include("src/xenia/apu/nop") include("src/xenia/apu/nop")
include("src/xenia/apu/sdl")
include("src/xenia/base") include("src/xenia/base")
include("src/xenia/cpu") include("src/xenia/cpu")
include("src/xenia/cpu/backend/x64") include("src/xenia/cpu/backend/x64")
@ -239,16 +244,32 @@ solution("xenia")
include("src/xenia/gpu") include("src/xenia/gpu")
include("src/xenia/gpu/null") include("src/xenia/gpu/null")
include("src/xenia/gpu/vulkan") include("src/xenia/gpu/vulkan")
include("src/xenia/helper/sdl")
include("src/xenia/hid") include("src/xenia/hid")
include("src/xenia/hid/nop") include("src/xenia/hid/nop")
include("src/xenia/hid/sdl")
include("src/xenia/kernel") include("src/xenia/kernel")
include("src/xenia/ui") include("src/xenia/ui")
include("src/xenia/ui/spirv") include("src/xenia/ui/spirv")
include("src/xenia/ui/vulkan") include("src/xenia/ui/vulkan")
include("src/xenia/vfs") include("src/xenia/vfs")
if not os.istarget("android") then
-- SDL2 requires sdl2-config, and as of November 2020 isn't high-quality on
-- Android yet, most importantly in game controllers - the keycode and axis
-- enums are being ruined during conversion to SDL2 enums resulting in only
-- one controller (Nvidia Shield) being supported, digital triggers are also
-- not supported; lifecycle management (especially surface loss) is also
-- complicated.
include("third_party/SDL2.lua")
include("src/xenia/apu/sdl")
include("src/xenia/helper/sdl")
include("src/xenia/hid/sdl")
-- TODO(Triang3l): src/xenia/app has a dependency on xenia-helper-sdl, bring
-- it back later.
include("src/xenia/app")
end
if os.istarget("windows") then if os.istarget("windows") then
include("src/xenia/apu/xaudio2") include("src/xenia/apu/xaudio2")
include("src/xenia/gpu/d3d12") include("src/xenia/gpu/d3d12")

View File

@ -1,7 +1,12 @@
group("third_party") group("third_party")
project("cpptoml") project("cpptoml")
uuid("1e86cc51-3f8b-476d-9249-3b200424846b") uuid("1e86cc51-3f8b-476d-9249-3b200424846b")
kind("Utility") if os.istarget("android") then
-- ndk-build only supports StaticLib and SharedLib.
kind("StaticLib")
else
kind("Utility")
end
language("C++") language("C++")
files({ files({
"cpptoml/include/cpptoml.h", "cpptoml/include/cpptoml.h",

View File

@ -1,7 +1,12 @@
group("third_party") group("third_party")
project("cxxopts") project("cxxopts")
uuid("8b68cbe8-2da4-4f28-be14-9352eafa3168") uuid("8b68cbe8-2da4-4f28-be14-9352eafa3168")
kind("Utility") if os.istarget("android") then
-- ndk-build only supports StaticLib and SharedLib.
kind("StaticLib")
else
kind("Utility")
end
language("C++") language("C++")
files({ files({
"cxxopts/include/cxxopts.hpp", "cxxopts/include/cxxopts.hpp",

1
third_party/premake-androidmk vendored Submodule

@ -0,0 +1 @@
Subproject commit a9f1733a70e71c1fc27a93e4153ac5e077d20c08