https://github.com/d-led/premake-meta-cpp
a quickstart infrastructure for cross-platform c++ makefile and solution generation
https://github.com/d-led/premake-meta-cpp
Last synced: about 1 year ago
JSON representation
a quickstart infrastructure for cross-platform c++ makefile and solution generation
- Host: GitHub
- URL: https://github.com/d-led/premake-meta-cpp
- Owner: d-led
- License: unlicense
- Created: 2013-10-17T19:50:25.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T22:00:19.000Z (about 6 years ago)
- Last Synced: 2025-04-14T04:15:00.036Z (about 1 year ago)
- Language: Lua
- Homepage:
- Size: 7.75 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
premake patterns
================
For most of my c++ projects I use [premake](http://premake.github.io/) as the meta-build system to generate platform-specific build files. This project is a collection of repeated patterns extracted from various projects to speed up the initial build environment setup.
I could have used [automake](http://www.gnu.org/software/automake/), [cmake](http://www.cmake.org/) or [QMake](http://qt-project.org/doc/qt-5.0/qtdoc/qmake-project-files.html), but the eunoia of [Lua](http://www.lua.org/), having only one small executable as your pocket knife is just too appealing.
This project includes premake binaries and is build around premake, but is otherwise not affiliated with premake development. Its primary goal is providing a number of patterns for build file locations and similar simplifications.
This repository should look somewhat different, as premake5 makes many things much easier.
a quick start
-------------
Assuming, you include this project as a submodule or just copy it into the folder `premake`, with one file `test.cpp` that you want to build, prepare a `premake4.lua` file with the following contents in the root folder:
```lua
include 'premake'
make_solution 'test'
make_console_app('test', { 'test.cpp' })
use_standard('c++11')
```
calling `premake/premake4 gmake` in Linux will create makefiles in the folder `Build/linux/gmake`.
#### customizing ####
a global table `config` is available for customization. I.e.
`config.location_pattern = [[CustomBuild/%o/%v/%t]]`
before `make_solution` will customize the build file location to `CustomBuild/[os name]/[os version]/[toolchain]`. Check out [`config.lua`](config.lua) for other customization options.
an example project
------------------
Here's a project using this component: [selfdestructing](https://github.com/d-led/selfdestructing).
premake
-------
Check out [premake](https://premake.github.io/) for more info, license and copyrights.
Binaries for Windows, Linux and Mac OS X are included in this project. See the official [premake](https://premake.github.io/) website if you want to build it or install a different version of it yourself.