[Qgis-developer] Cmake and the unhappy python build

Martin Dobias wonder.sk at gmail.com
Tue Apr 10 16:57:33 EDT 2007


On 4/10/07, Mark Coletti <mcoletti at lychnobite.org> wrote:
>
>   I'm curious to know whether the sip generated Makefiles will be
>   clobbered by cmake.
>
>   In any case, this is the only Makefile in the entire 'qgis/python'
>   hierarchy:
>
> mcoletti at mcolettib886:~/projects/qgis> find python/ -name "Makefile"
> python/Makefile
>
>   And it appears to be created via CMake:
>
> mcoletti at mcolettib886:~/projects/qgis> head python/Makefile
> # CMAKE generated file: DO NOT EDIT!
> # Generated by "Unix Makefiles" Generator, CMake Version 2.4
>
>   So there does not exist in that hierarchy any make files generated
>   via sip.

That's right - main makefile for python bindings (python/Makefile) is
generated from CMake. But makefiles which build python bindings should
be python/core/Makefile and python/gui/Makefile - something had to go
wrong if they don't exist. But then I don't understand this:

> > >make[2]: *** No rule to make target `src/core/libqgis_core.so', needed by
> > >`python/core/Makefile'.  Stop.

Which looks like python/core/Makefile exists...


> > I'm wondering why it complains that src/core/libqgis_core.so library
> > is missing - what's the name of the output file which is built in
> > qgis_core target?
>
>   Target from which Makefile?  Certainly not from the aforementioned
>   CMake generated Makefile found in 'qgis/python':
>
> mcoletti at mcolettib886:~/projects/qgis> grep qgis_core python/Makefile
> mcoletti at mcolettib886:~/projects/qgis>
>
>   I.e., ain't no such target in that Makefile.

libqgis_core.so is built by src/core/Makefile.


> > Btw. preferred way how to build QGIS with cmake is to use out of
> > source builds. There should be no difference but it doesn't pollute
> > sources with any generated files and it's simpler to do a complete
> > clean or have more builds at once (Debug/Release, with/without GRASS
> > etc.)
>
>   I'm confused by your phrase "out of source builds."  I'm using
>   subversion to check out the latest source from HEAD and am building
>   from that and not from source from a distribution tarball or from a
>   non-HEAD subversion branch.  Is that to what you're referring?

Out of source builds are mentioned on wiki:
http://wiki.qgis.org/qgiswiki/Building_with_CMake
Basically it means that all build related files (configuration,
makefiles, generated files, output files) are in a separate directory.

Martin



More information about the Qgis-developer mailing list