Building Synfig Using CMake
The usual process of building with CMake is pretty much the same as the standard one, but despite that, this part will cover that so you can follow along and get the same results.
Below you will find instructions how to build Synfig on various operating systems.
Linux
You need to make a directory where Synfig will be built.
$ mkdir cmake-build && cd cmake-build
Once you’re in your build folder, this is the part where you can configure and set different CMake flags according to your need. For the purpose of this documentation, the default build will be followed.
$ cmake ..
When it completes, you need to build Synfig using make command.
$ make
Once this is complete, you will find the build present in /output folder of your build directory. You can run Synfig by using
$ ./output/bin/synfigstudio
You can also specify a target if you want to build that specific target.
$ make build_images
If you wish to install Synfig to /usr/local/, make sure you have root privileges (or write permissions to those three directories), and simply type
$ make install
OSX
Building on OSX follows the same steps as that of Linux. You need to make a build folder first.
$ mkdir cmake-build && cd cmake-build
Once that’s done, you can run the CMake command along with passing any flags as required.
$ cmake ..
When it completes, you need to build Synfig using make command.
$ make
Once this is complete, you will find the build present in /output folder of your build directory. You can run Synfig by using
$ ./output/bin/synfigstudio
Windows
Synfig is shipped with this special script to build it on Windows (MSYS2). All you need to do is run that script.
Note
Before commit 3f07959, the special script was named ./2-build-msys-cmake.sh instead of ./2-build-cmake.sh. Same applies to the default build directory: it was named ./cmake-build-msys back then.
$ ./2-build-cmake.sh
Once this is completed successfully, you can run Synfig by.
$ ./cmake-build/output/Release/bin/synfigstudio.exe
You can also use this script to run a debug build by using the argument: Debug
$ ./2-build-cmake.sh Debug
Then, you can run Synfig by.
$ ./cmake-build/output/Debug/bin/synfigstudio.exe