Difference between revisions of "Gnucash Build Options"
From GnuCash
m (Add references to cmake for main Building page) |
(→Other Settings) |
||
(6 intermediate revisions by 5 users not shown) | |||
Line 3: | Line 3: | ||
=== V 3.x === | === V 3.x === | ||
==== Variables ==== | ==== Variables ==== | ||
− | 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. For basics building gnucash see page [[Build Tools]]. |
{|class="wikitable" | {|class="wikitable" | ||
!VARIABLE NAME | !VARIABLE NAME | ||
Line 10: | Line 10: | ||
|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). Can also be set as an environment variable. | |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. | ||
− | |||
− | |||
− | |||
|- | |- | ||
|GNC_DBD_DIR | |GNC_DBD_DIR | ||
Line 23: | Line 20: | ||
|The complete URL including password for a PostgreSQL test database for running the SQL backend tests with PostgreSQL. | |The complete URL including password for a PostgreSQL test database for running the SQL backend tests with PostgreSQL. | ||
|} | |} | ||
+ | |||
==== Options ==== | ==== 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 | 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 | ||
Line 99: | Line 97: | ||
Consult the root CMakeLists.txt in the GnuCash source directory for a current list of settings and options. | Consult the root CMakeLists.txt in the GnuCash source directory for a current list of settings and options. | ||
==== Other Settings ==== | ==== Other Settings ==== | ||
− | These use the same format as the build options. See [https://cmake.org/cmake/help/ | + | These use the same format as the build options. See [https://cmake.org/cmake/help/v{{CMake_Version}}/manual/cmake-variables.7.html CMake documentation] for more detail. |
{|class="wikitable" | {|class="wikitable" | ||
!style="text-align:left;"|SETTING NAME | !style="text-align:left;"|SETTING NAME | ||
Line 146: | Line 144: | ||
* [https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/ A blog post] about handling dependencies and targets for custom build commands. | * [https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/ A blog post] about handling dependencies and targets for custom build commands. | ||
* [http://llvm.org/docs/CMakePrimer.html LLVM's CMake Primer], a more programmer-oriented tutorial than the one in the CMake documentation. | * [http://llvm.org/docs/CMakePrimer.html LLVM's CMake Primer], a more programmer-oriented tutorial than the one in the CMake documentation. | ||
+ | |||
+ | [[category:Building]] [[category:Tools]] |
Revision as of 12:21, 26 March 2021
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:
- http://www.cmake.org/Wiki/CMake_FAQ FAQ
- http://www.cmake.org/HTML/Download.html - Download
- http://www.cmake.org/HTML/Documentation.html - The same page which you also get by "man cmake".
- http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/ - Potentially helpful additional macros
- A blog post about handling dependencies and targets for custom build commands.
- LLVM's CMake Primer, a more programmer-oriented tutorial than the one in the CMake documentation.