Configuring a Zorba Build Using CMakeOverviewWe will now configure the Zorba build by running CMake. We assume that the appropriate build preparations (described in Preparing to Build Zorba) have been performed.The instructions in this section are based on executing commands at the command line. It is also possible configure Zorba using CMake's GUI configuration utility if you prefer. On Linux distributions, this is often a separate package named "cmake-gui". On Windows, the GUI is installed by default and can be started via the Start menu. On MacOS, it is available as the "gui" variant of the CMake package.
The basic steps to configure Zorba are:
If you need to re-configure the project later, CMake will remember your chosen generator and -D configuration parameters; it is not necessary to specify -G / -D every time.
CMake Generators (the -G argument)CMake is a meta build system. It is able to generate both native makefiles (e.g. GNU Make or NMake) and IDE workspaces (e.g. Visual Studio or KDevelop Projects), depending on which CMake generator is selected. By default it will generate a UNIX-style Makefile-based project.You specify the generator to use with the -G arguments to cmake. For example, on Windows, you can create a Visual Studio 10 solution by executing the following command in the {ZORBASRC} directory:cmake -G "Visual Studio 10" {ZORBASRC}The list of available Generators for your CMake installation can be seen by typing cmake --help
.Configuration Parameters (the -D arguments)In most circumstances it will be necessary to specify a few parameters to CMake, such as the various configuration parameters mentioned above in Library Dependencies. You do this with a series of -D arguments to CMake. For example, to build Zorba without ICU (Unicode) support:cmake -D ZORBA_NO_ICU=ON {ZORBASRC}
A complete list of Zorba's configuration parameters can be found here: Zorba Configuration Parameters. CMake itself also has some configuration parameters that may be important for you; here are three of the most common:
What's next?Once CMake runs without reporting any configuration errors, move on to Building and Installing Zorba. |