Using CMake

Stephen Brown StephenBrown165 at outlook.com
Fri Feb 10 15:29:05 EST 2017


Hi Geert

From: Geert Janssens
Sent: Saturday, February 11, 2017 4:14 AM
To: gnucash-devel at gnucash.org
Cc: Stephen Brown
Subject: Re: Using CMake

Op vrijdag 10 februari 2017 12:15:15 CET schreef Stephen Brown:
> Hi All,
>
> I have finally got install.sh from /c/gcdev/gnucash-on-windows.git running
> without errors using the suggested changes. How do I use cmake when in
> /c/gcdev/gnucash.git on master branch in a gcdev msys shell.
>
> When I use ./configure it comes up with
>
> ----------------------------------------------------------------------------
> ------
>
> configure: error: The intltool scripts were not found. Please install
> intltool.
>
> GNUCash at Ace /c/gcdev/gnucash.git
> -----------------------------------------------------------------------
>
> Cheers
> Stephen Brown

Stephen,

When you want to use cmake, you no longer call configure. configure is part of
the autotools build system.

However, you're likely to run into the same kind of errors using cmake because
the environment is set up to always use install.sh to run builds.

The reason for this is each build dependency of gnucash gets installed in its
own directory (because the build system has no package management to manage
package installations). install.sh adds each dependency to the PATH variable
as it chugs along so that when it gets to actually building gnucash itself all
dependencies are found on the path. This part is missing when you run cmake/
configure manually.

Having said that, I believe you can also set up the build environment
correctly outside of install.sh using the devrc.sh script. It's usage is
explained in the file itself. I have never used it before, but I think others
have.

In short
- open an msys shell
- source devrc.sh in it (". /c/gcdev/devrc.sh")
- use configure/cmake/whatever as you normally would. But don't run install.sh
in this shell. It will probably fail.

Regards,

Geert
Hi Geert
I open the gcdev msys shell window.
I “cd /c/gcdev/gnucash.git”
I “. /c/gcdev/gnucash-on-windows.git/devrc.sh”
The shell disappears
I re-open the gcdev msys shell window.
I get the following output
-------------------------------------------------------------------
GNUCash at Ace /c/gcdev/gnucash.git
$ /c/gcdev/cmake/bin/cmake.exe
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.


GNUCash at Ace /c/gcdev/gnucash.git

----------------------------------------------------------
What is the correct command line?

Cheers
Stephen Brown



More information about the gnucash-devel mailing list