.
This commit is contained in:
parent
f19081d586
commit
6bbbd0193a
10 changed files with 928 additions and 7 deletions
44
files/.premake/ninja/README.md
Normal file
44
files/.premake/ninja/README.md
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# premake-ninja
|
||||
|
||||
[Premake](https://github.com/premake/premake-core) module to support [Ninja](https://github.com/martine/ninja), because it's awesome.
|
||||
Note recent version of premake handles ninja natively
|
||||
|
||||
## Usage (little reminder)
|
||||
1. Put these files in a "premake-ninja" subdirectory of [Premake search paths](https://premake.github.io/docs/Locating-Scripts/).<br>
|
||||
|
||||
2. Adapt your premake5.lua script, or better: create/adapt your [premake-system.lua](https://premake.github.io/docs/System-Scripts/)
|
||||
|
||||
```lua
|
||||
require "premake-ninja/premake-ninja"
|
||||
```
|
||||
|
||||
3. Generate ninja files
|
||||
|
||||
```sh
|
||||
premake5 premake-ninja
|
||||
```
|
||||
On msys2 (mingw)
|
||||
```sh
|
||||
premake5 premake-ninja --cc=gcc --shell=posix
|
||||
```
|
||||
|
||||
4. Run ninja
|
||||
|
||||
For each project - configuration pair, we create separate .ninja file. For solution we create build.ninja file which imports other .ninja files with subninja command.
|
||||
|
||||
Build.ninja file sets phony targets for configuration names so you can build them from command line. And default target is the first configuration name in your project (usually default).
|
||||
|
||||
General from:
|
||||
```sh
|
||||
ninja $(YourProjectName)_$(ConfigName)
|
||||
```
|
||||
as example:
|
||||
```sh
|
||||
ninja myapp_Release
|
||||
```
|
||||
|
||||
### Tested on   
|
||||
|
||||
### Extra Tests
|
||||
|
||||
Part of integration tests of several generators in https://github.com/Jarod42/premake-sample-projects 
|
||||
Loading…
Add table
Add a link
Reference in a new issue