Difference between revisions of "Gnucash Build Options"
From GnuCash
(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) |
m (Add TYPE & VALUES column to cmake command options. Fix up some options) |
||
Line 5: | Line 5: | ||
These variables may need to be set as environment variables to build GnuCash. | These variables may need to be set as environment variables to build GnuCash. | ||
{|class="wikitable" | {|class="wikitable" | ||
− | |||
!VARIABLE NAME | !VARIABLE NAME | ||
!DESCRIPTION | !DESCRIPTION | ||
|- | |- | ||
|GTEST_ROOT | |GTEST_ROOT | ||
− | |Set to location of gtest if not installed in expected locations for the distribution (see [[Google Test | here]] for more information). | + | |Set to location of gtest if not installed in expected locations for the distribution (see [[Google Test | here]] for more information). Can also be set as an environment variable. |
|- | |- | ||
|GMOCK_ROOT | |GMOCK_ROOT | ||
− | |Set to the location of gmock if not installed in the expected locations for the distribution (see [[Google Test | here]] for more information). | + | |Set to the location of gmock if not installed in the expected locations for the distribution (see [[Google Test | here]] for more information). Can also be set as an environment variable. |
|- | |- | ||
|GNC_DBD_DIR | |GNC_DBD_DIR | ||
Line 28: | Line 27: | ||
{|class="wikitable" | {|class="wikitable" | ||
!style="text-align:left;"|OPTION NAME | !style="text-align:left;"|OPTION NAME | ||
− | !style="text-align:left;"|DEFAULT VALUE | + | !style="text-align:left;"|DEFAULT VALUE |
+ | !style="text-align:left;"|TYPE & VALUES | ||
!style="text-align:left;"|DESCRIPTION | !style="text-align:left;"|DESCRIPTION | ||
|- | |- | ||
|WITH_SQL | |WITH_SQL | ||
|style="color: green;text-align:center;"|ON | |style="color: green;text-align:center;"|ON | ||
+ | |Boolean: ON, OFF | ||
|Build this project with SQL (libdbi) support | |Build this project with SQL (libdbi) support | ||
|- | |- | ||
|WITH_AQBANKING | |WITH_AQBANKING | ||
|style="color: green;text-align:center;"|ON | |style="color: green;text-align:center;"|ON | ||
+ | |Boolean: ON, OFF | ||
|Build this project with aqbanking (online banking -see dependencies) support | |Build this project with aqbanking (online banking -see dependencies) support | ||
|- | |- | ||
|WITH_GNUCASH | |WITH_GNUCASH | ||
|style="color: green;text-align:center;"|ON | |style="color: green;text-align:center;"|ON | ||
+ | |Boolean: ON, OFF | ||
|Build all of GnuCash, not just the library | |Build all of GnuCash, not just the library | ||
|- | |- | ||
|WITH_OFX | |WITH_OFX | ||
|style="color: green;text-align:center;"|ON | |style="color: green;text-align:center;"|ON | ||
+ | |Boolean: ON, OFF | ||
| Compile with ofx support (needs LibOFX) | | Compile with ofx support (needs LibOFX) | ||
|- | |- | ||
|WITH_PYTHON | |WITH_PYTHON | ||
|style="color: red;text-align:center;"|OFF | |style="color: red;text-align:center;"|OFF | ||
+ | |Boolean: ON, OFF | ||
|Enable python plugin and bindings | |Enable python plugin and bindings | ||
|- | |- | ||
|ENABLE_BINRELOC | |ENABLE_BINRELOC | ||
|style="color: green;text-align:center;"|ON | |style="color: green;text-align:center;"|ON | ||
+ | |Boolean: ON, OFF | ||
|Compile with binary relocation support | |Compile with binary relocation support | ||
|- | |- | ||
|ENABLE_REGISTER2 | |ENABLE_REGISTER2 | ||
|style="color: red;text-align:center;"|OFF | |style="color: red;text-align:center;"|OFF | ||
+ | |Boolean: ON, OFF | ||
|Compile with register2 enabled. Builds the not-quite-finished GtkTreeView register replacement. | |Compile with register2 enabled. Builds the not-quite-finished GtkTreeView register replacement. | ||
|- | |- | ||
|DISABLE_NLS | |DISABLE_NLS | ||
|style="color: red;text-align:center;"|OFF | |style="color: red;text-align:center;"|OFF | ||
+ | |Boolean: ON, OFF | ||
|Do not use Native Language Support. Turns off generating translation calls for strings. | |Do not use Native Language Support. Turns off generating translation calls for strings. | ||
|- | |- | ||
|DISABLE_DEPRECATED_GLIB | |DISABLE_DEPRECATED_GLIB | ||
|style="color: red;text-align:center;"|OFF | |style="color: red;text-align:center;"|OFF | ||
+ | |Boolean: ON, OFF | ||
|Don't use deprecated glib functions. Raises an error when deprecated GLib functions are encountered. | |Don't use deprecated glib functions. Raises an error when deprecated GLib functions are encountered. | ||
|- | |- | ||
|DISABLE_DEPRECATED_GTK | |DISABLE_DEPRECATED_GTK | ||
|style="color: red;text-align:center;"|OFF | |style="color: red;text-align:center;"|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. | |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 | |DISABLE_DEPRECATED_GNOME | ||
|style="color:red;text-align:center;"|OFF | |style="color:red;text-align:center;"|OFF | ||
+ | |Boolean: ON, OFF | ||
|Don't use deprecated gnome functions. Raises an error when deprecated functions in other Gnome libraries are encountered. | |Don't use deprecated gnome functions. Raises an error when deprecated functions in other Gnome libraries are encountered. | ||
|- | |- | ||
|ALLOW_OLD_GETTEXT | |ALLOW_OLD_GETTEXT | ||
|style="color: red;text-align:center;"|OFF | |style="color: red;text-align:center;"|OFF | ||
+ | |Boolean: ON, OFF | ||
|Allow to configure build with a gettext version older than 0.19.6. Some files will not be translated! | |Allow to configure build with a gettext version older than 0.19.6. Some files will not be translated! | ||
|- | |- | ||
|GNC_BUILD_AS_INSTALL | |GNC_BUILD_AS_INSTALL | ||
|style="color: green;text-align:center;"|ON | |style="color: green;text-align:center;"|ON | ||
+ | |Boolean: ON, OFF | ||
|Mirrors the installation layout instead of the source layout for final build products. | |Mirrors the installation layout instead of the source layout for final build products. | ||
|- | |- | ||
Line 89: | Line 102: | ||
{|class="wikitable" | {|class="wikitable" | ||
!style="text-align:left;"|SETTING NAME | !style="text-align:left;"|SETTING NAME | ||
− | !style="text-align:left;"|DEFAULT VALUE | + | !style="text-align:left;"|DEFAULT VALUE |
+ | !style="text-align:left;"|TYPE & VALUES | ||
!style="text-align:left;"|DESCRIPTION | !style="text-align:left;"|DESCRIPTION | ||
|- | |- | ||
|COMPILE_GSCHEMAS | |COMPILE_GSCHEMAS | ||
|style="color: green;text-align:center;"|ON | |style="color: green;text-align:center;"|ON | ||
+ | |Boolean: ON, OFF | ||
|Compile the GSettings Schema - better integration with Gnome | |Compile the GSettings Schema - better integration with Gnome | ||
|- | |- | ||
|GNUCASH_BUILD_ID | |GNUCASH_BUILD_ID | ||
|style="text-align:center;"|"" | |style="text-align:center;"|"" | ||
+ | |String | ||
|Overrides the GnuCash build ID (default vcs commit number) May be used for package version number by Distributions | |Overrides the GnuCash build ID (default vcs commit number) May be used for package version number by Distributions | ||
|- | |- | ||
|GENERATE_SWIG_WRAPPERS | |GENERATE_SWIG_WRAPPERS | ||
|style="color:red;text-align:center;"|OFF | |style="color:red;text-align:center;"|OFF | ||
+ | |Boolean: ON, OFF | ||
|Controls whether swig wrappers are generated for guile and python. Only set if building from a git worktree. | |Controls whether swig wrappers are generated for guile and python. Only set if building from a git worktree. | ||
|- | |- | ||
|CMAKE_INSTALL_PREFIX | |CMAKE_INSTALL_PREFIX | ||
− | | | + | |/usr/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. | + | |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 | |CMAKE_PREFIX_PATH | ||
− | | | + | |"" |
− | |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 | + | |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 behavior of CMake see [https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html | documentation.] | ||
|} | |} |
Revision as of 04:22, 5 May 2018
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). Can also be set as an environment variable. |
GMOCK_ROOT | Set to the location of gmock if not installed in the 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
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 | documentation.] |