This chapter is a basic introduction to CMake, the build system used by PySide and the binding generator runner.
The practical steps will focus on how to use cmake on a Unix-like (GNU/Linux) environment.
CMake parses the file CMakeLists.txt for information about the project, like project name, dependencies, what should be compiled, what should be shipped.
CMake can have its default behavior modified by providing some
You can define a variable using the -D<VARIABLE> switch like the example below.
After writing the CMakeLists.txt and deciding which flags will be used, you can invoke CMake using:
cmake <CMake flags> <path to toplevel CMakeLists.txt file>
For example, if you use the build/ folder to build the project and want it to be installed into /opt/sandbox/, use the following lines:
cd build/
cmake -DCMAKE_INSTALL_PREFIX=/opt/sandbox ..
CMake will process the project file and write the output files in the current directory
After the configuration process, the Makefiles are written and you can build the project using make.
As in the building process, make install will install the files into the target directory.