Commit ff2bb279 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Update README

parent 445265af
Very easy to use :
Qt Smart Build
==============
An easy to use abstraction layer for configuration and build with Qt major build systems, on popular toolchains and platforms.
Clone the project somewhere, then add a symlink to the bash script in the runner home.
## Installation
Then add the config file in the runner home `~/.qt-smart-build.env` with the following line :
Just clone the repository somewhere, and for convenience add a symlink to the bash script in your home directory.
`GCC_PATH=/path/to/gcc/binary` (only if you want to build with GCC/G++)
`CLANG_PATH=/path/to/clang/binary` (only if you want to build with Clang)
## Configuration
`QBS_PATH=/path/to/qbs/binary` (only if you want to use QBS projects)
Add a config file in the home directory named `.qt-smart-build.env` and fill it with some path values :
And as many QMake lines as Qt versions you have :
`QMAKE_<qt major version><qt minor version>_PATH=/path/to/qmake/binary` (for example QMAKE_56_PATH for Qt 5.6)
### Build tools
- `QBS_PATH="/path/to/qbs_binary"` if you want to use QBS projects
Then to build a project, just call this single line :
`bash ~/qt5-smart-build.sh <qbs|qmake> <gcc|clang> qt <major=5>.<minor=2,4,5,6,7...> <release|debug>`
### Toolchains
Lines are of the form `<toolchain>_PATH="<path>"` :
This command can be called easily from CI scripts.
\ No newline at end of file
- `GCC64_PATH="/path/to/gcc_binary"` if you want to build with GCC/G++ on Linux 64bit
- `CLANG64_PATH="/path/to/clang_binary"` if you want to build with Clang on Linux 64bit
- `MSVC64_2015_PATH="/path/to/amd64/cl.exe"` if you want to build with VS2015 on Windows 64bit
- `MINGW32_530_PATH="/path/to/mingw/g++.exe"` if you want to build with MinGW 5.3.0 on Windows
- `MINGW32_492_PATH="/path/to/mingw/g++.exe"` if you want to build with MinGW 4.9.2 on Windows
### Qt versions
Add as many QMake lines as Qt versions you have, with the form `QMAKE_<qt major version><qt minor version>_<toolchain>_PATH="/path/to/qmake_binary"`.
For example :
- `QMAKE_56_GCC64_PATH="/opt/QtSDK/5.6/gcc_64/bin/qmake"` for Qt 5.6 with GCC on Linux 64bit
- `QMAKE_58_MSVC64_2015_PATH="C:\QtSDK\5.8\msvc2015_64\bin\qmake.exe"` for Qt 5.8 with MSVC 2015 on Windows 64bit
> NOTE : on Linux, GCC version of QMake can be used for QMAKE_XX_CLANG64_PATH variables too.
## Use
Then to build a project, just call this single line from inside the project root directory :
`$ bash ~/qt5-smart-build.sh <build system> <toolchain> qt <version> <build mode> <option>`
With the following arguments values :
- **build system** :
+ On Linux : `gcc64`, or `clang64`
+ On Windows : `msvc64_2015`, `mingw32_492`, or `mingw32_530`
- **toolchain** : `qbs`, or `qmake`
- **version** : `5.xx` (replace `xx` with Qt minor version number)
- **build mode** : `release` or `debug`
- **option** : `clean`, or `preserve` (default if not specified)
> NOTE : This command can be called easily from CI scripts (e.g: GitLab CI bash runner).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment