Gnucash Build Options

From GnuCash
Revision as of 15:52, 3 October 2024 by Fell (talk | contribs) (Use of {{URL:cmake}}, {{URL:llvm}} fixes a few of the broken links)
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. For basics building gnucash see page Build Tools.

VARIABLE NAME DESCRIPTION
GTEST_ROOT Set to location of gtest if not installed in expected locations for the distribution (see here for more information). Can also be set as an environment variable.
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     TYPE & VALUES DESCRIPTION
WITH_SQL ON Boolean: ON, OFF Build this project with SQL (libdbi) support
WITH_AQBANKING ON Boolean: ON, OFF Build this project with aqbanking (online banking -see dependencies) support
WITH_GNUCASH ON Boolean: ON, OFF Build all of GnuCash, not just the library
WITH_OFX ON Boolean: ON, OFF Compile with ofx support (needs LibOFX)
WITH_PYTHON OFF Boolean: ON, OFF Enable python plugin and bindings
ENABLE_BINRELOC ON Boolean: ON, OFF Compile with binary relocation support
ENABLE_REGISTER2 OFF Boolean: ON, OFF Compile with register2 enabled. Builds the not-quite-finished GtkTreeView register replacement.
DISABLE_NLS OFF Boolean: ON, OFF Do not use Native Language Support. Turns off generating translation calls for strings.
DISABLE_DEPRECATED_GLIB OFF Boolean: ON, OFF Don't use deprecated glib functions. Raises an error when deprecated GLib functions are encountered.
DISABLE_DEPRECATED_GTK OFF Boolean: ON, 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 Boolean: ON, OFF Don't use deprecated gnome functions. Raises an error when deprecated functions in other Gnome libraries are encountered.
ALLOW_OLD_GETTEXT OFF Boolean: ON, 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 Boolean: ON, OFF 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. See CMake documentation for more detail.

SETTING NAME DEFAULT VALUE     TYPE & VALUES DESCRIPTION
COMPILE_GSCHEMAS ON Boolean: ON, OFF Compile the GSettings Schema - better integration with Gnome
GNUCASH_BUILD_ID "" String Overrides the GnuCash build ID (default vcs commit number) May be used for package version number by Distributions
GENERATE_SWIG_WRAPPERS OFF Boolean: ON, OFF Controls whether swig wrappers are generated for guile and python. Only set if building from a git worktree.
CMAKE_INSTALL_PREFIX /usr/local String: 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 or apt to install Gnucash from a distribution repository can overwrite your build and vice versa. Use the default with caution.
CMAKE_PREFIX_PATH "" String: 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_PREFIX_PATH=$HOME/.local.
CMAKE_BUILD_TYPE Release String: empty, Debug, Release, RelWithDebInfo and MinSizeRel Changes the behavior of CMake See documentation for details.


Further Reading: