Gnucash Build Options

From GnuCash
Revision as of 14:27, 29 April 2018 by DaveC49 (talk | contribs) (Generate a page for the Gnucash Build options that can be linked form the main Building Page and/or from the Building Ubuntu16.04 page)
Jump to: navigation, search

Gnucash Cmake Build Options

V 3.x

Variables

These variables may need to be set as environment variables to build GnuCash.

- VARIABLE NAME DESCRIPTION
GTEST_ROOT Set to location of gtest if not installed in expected locations for the distribution (see here for more information).
GMOCK_ROOT Set to the location of gmock if not installed in the expected locations for the distribution (see here for more information).
GNC_DBD_DIR The location of the DBD driver modules (e.g. libdbd-mysql.so) if not in the standard system library path (classically /usr/lib/dbd, but might be something like /usr/lib64/dbd or /usr/lib/x86_64-linux-gnu/dbd depending you your distro).
TEST_MYSQL_URL The complete URL including password for a MySQL test database for running the SQL backend tests with MySQL.
TEST_PGSQL_URL The complete URL including password for a PostgreSQL test database for running the SQL backend tests with PostgreSQL.

Options

These options may be set with the -D<option-name>=<value> switch on the cmake command for each option you desire to change from the default value

OPTION NAME DEFAULT VALUE     DESCRIPTION
WITH_SQL ON Build this project with SQL (libdbi) support
WITH_AQBANKING ON Build this project with aqbanking (online banking -see dependencies) support
WITH_GNUCASH ON Build all of GnuCash, not just the library
WITH_OFX ON Compile with ofx support (needs LibOFX)
WITH_PYTHON OFF Enable python plugin and bindings
ENABLE_BINRELOC ON Compile with binary relocation support
ENABLE_REGISTER2 OFF Compile with register2 enabled. Builds the not-quite-finished GtkTreeView register replacement.
DISABLE_NLS OFF Do not use Native Language Support. Turns off generating translation calls for strings.
DISABLE_DEPRECATED_GLIB OFF Don't use deprecated glib functions. Raises an error when deprecated GLib functions are encountered.
DISABLE_DEPRECATED_GTK OFF Don't use deprecated gtk, gdk or gdk-pixbuf functions. Raises an error when deprecated Gtk, Gdk, or GdkPixbuf functions are encountered.
DISABLE_DEPRECATED_GNOME OFF Don't use deprecated gnome functions. Raises an error when deprecated functions in other Gnome libraries are encountered.
ALLOW_OLD_GETTEXT OFF Allow to configure build with a gettext version older than 0.19.6. Some files will not be translated!
GNC_BUILD_AS_INSTALL ON Mirrors the installation layout instead of the source layout for final build products.

Consult the root CMakeLists.txt in the GnuCash source directory for a current list of settings and options.

Other Settings

These use the same format as the build options

SETTING NAME DEFAULT VALUE     DESCRIPTION
COMPILE_GSCHEMAS ON Compile the GSettings Schema - better integration with Gnome
GNUCASH_BUILD_ID "" Overrides the GnuCash build ID (default vcs commit number) May be used for package version number by Distributions
GENERATE_SWIG_WRAPPERS OFF Controls whether swig wrappers are generated for guile and python. Only set if building from a git worktree.
CMAKE_INSTALL_PREFIX $HOME/.local Location in which to install Gnucash. For a single user installation $HOME/.local (only requires make install). For system wide /usr/local or /opt (will require sudo make install). Note for system wide install some distribution versions install in these locations. If installed here an install using the Software Manager can overwrite your build and vice versa. Use with caution.
CMAKE_PREFIX_PATH $HOME/.local Declares a : separated (or ; separated on Windows) set of search paths for roots of include and library files, needed if some dependencies are not installed in the default locations, i.e. /usr and /usr/local on most Unix systems. For example if you've built some dependencies from source and installed them in $HOME/.local you'd need to use CMAKE_INSTALL_PREFIX=$HOME/.local.