vsandroid_vstudio.lua 862 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --
  2. -- android/vsandroid_vstudio.lua
  3. -- vs-android integration for vstudio.
  4. -- Copyright (c) 2012-2015 Manu Evans and the Premake project
  5. --
  6. local p = premake
  7. local android = p.modules.android
  8. local vsandroid = p.modules.vsandroid
  9. local vstudio = p.vstudio
  10. --
  11. -- Add android tools to vstudio actions.
  12. --
  13. premake.override(vstudio, "solutionPlatform", function (oldfn, cfg)
  14. local platform = oldfn(cfg)
  15. -- Bypass that pesky Win32 hack
  16. if cfg.system == premake.ANDROID and _ACTION >= "vs2015" then
  17. if cfg.platform == "x86" then
  18. platform = "x86"
  19. end
  20. end
  21. return platform
  22. end)
  23. premake.override(vstudio, "archFromConfig", function (oldfn, cfg, win32)
  24. -- Bypass that pesky Win32 hack by not passing win32 down
  25. if cfg.system == premake.ANDROID and _ACTION >= "vs2015" then
  26. return oldfn(cfg)
  27. end
  28. return oldfn(cfg, win32)
  29. end)