Search code examples
premake

Premake5 specify platform at command line?


I have a list of platforms in my premake5.lua file like this:

platforms { "windows", "macos", "ios" }

How do specify the platform when invoking premake?

This doesn't work:

premake5 xcode4 --platform=macos

I just get the error Error: invalid option 'platform'


Solution

  • The command-line options must have changed somewhat from v4 to v5. Looking at the source code the option to use would be --os, (--platform doesn't appear to be there):

    --os=macosx 
    

    You can also define new options, which this document explains in more detail.