Blame README-CMake.md

7c321a
### CMake status
7c321a
7c321a
We're currently in the [process of switching to CMake build system][cmake] and
7c321a
you're welcome to take part in testing and improving it.
7c321a
7c321a
- all major components are buildable, installable and runnable
7c321a
- building all components without installing ETL & core is not tested
7c321a
7c321a
Tested to work on (this will be updated as reports come in):
7c321a
7c321a
- Debian Sid
7c321a
7c321a
7c321a
### Dependencies
7c321a
7c321a
You need development & library packages of the following libs:
7c321a
7c321a
- boost (system)
7c321a
- zlib
7c321a
- libsigc++-2.0
7c321a
- glibmm-2.4
7c321a
- giomm-2.4
7c321a
- cairo
7c321a
- libxml++-2.6
7c321a
- mlt++
7c321a
- fftw3
7c321a
- pango
7c321a
- gtkmm-3.0 (only for studio)
7c321a
- gettext
7c321a
- some threading support (e.g. pthread)
7c321a
7c321a
Generally CMake will throw error if it doesn't find something, so you can just
7c321a
run it and see what's missing. Also note that this list might not be full.
7c321a
7c321a
7c321a
### CMake backend
7c321a
7c321a
CMake provides generators for multiple build systems. You can use default `make`
7c321a
or `ninja`, which should generally work somewhat faster. The following
7c321a
configuration commands assume you want to use `ninja`. If you don't, remove
7c321a
`-GNinja` from all commands containing it. All the building commands here are
7c321a
invoked via cmake to make them (almost) backend-agnostic, but you can run `make`
7c321a
or `ninja` directly (i.e.
7c321a
`ninja all test` instead of `cmake --build . -- all test`).
7c321a
7c321a
### Build options
7c321a
7c321a
You may want to add `-jN` (where N is amount of threads you want to run) option
7c321a
to build commands, because default for `make` is to run single-threaded and
7c321a
`ninja` tends to use too much threads which eat up your RAM (may vary).
7c321a
7c321a
### Building
7c321a
7c321a
```
7c321a
$ pushd ETL
7c321a
$ mkdir build && pushd build
7c321a
$ cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
7c321a
$ cmake --build . -- all test
7c321a
$ sudo cmake --build . -- install
7c321a
$ popd # build
7c321a
$ popd # ETL
7c321a
$ pushd synfig-core
7c321a
$ mkdir build && pushd build
7c321a
$ cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fdiagnostics-color"
7c321a
$ cmake --build . -- all
7c321a
$ sudo cmake --build . -- install
7c321a
$ popd # build
7c321a
$ popd # synfig-core
7c321a
$ pushd synfig-studio
7c321a
$ mkdir build && pushd build
7c321a
$ cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fdiagnostics-color"
7c321a
$ cmake --build . -- all
7c321a
# this will take a while; alternatively, you can move/copy required images
7c321a
# to build/images directory and skip this step
7c321a
$ cmake --build . -- build_images
7c321a
$ sudo cmake --build . -- install
7c321a
$ popd # build
7c321a
$ popd # synfig-studio
7c321a
```
7c321a
7c321a
[cmake]:        https://github.com/synfig/synfig/issues/279