forked from premake/premake-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvsandroid_vstudio.lua
More file actions
38 lines (29 loc) · 862 Bytes
/
vsandroid_vstudio.lua
File metadata and controls
38 lines (29 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--
-- android/vsandroid_vstudio.lua
-- vs-android integration for vstudio.
-- Copyright (c) 2012-2015 Manu Evans and the Premake project
--
local p = premake
local android = p.modules.android
local vsandroid = p.modules.vsandroid
local vstudio = p.vstudio
--
-- Add android tools to vstudio actions.
--
premake.override(vstudio, "solutionPlatform", function (oldfn, cfg)
local platform = oldfn(cfg)
-- Bypass that pesky Win32 hack
if cfg.system == premake.ANDROID and _ACTION >= "vs2015" then
if cfg.platform == "x86" then
platform = "x86"
end
end
return platform
end)
premake.override(vstudio, "archFromConfig", function (oldfn, cfg, win32)
-- Bypass that pesky Win32 hack by not passing win32 down
if cfg.system == premake.ANDROID and _ACTION >= "vs2015" then
return oldfn(cfg)
end
return oldfn(cfg, win32)
end)