[CMake] integrating separate packages in one "superbuild" eclipse project

Alexander Dahl post at lespocky.de
Fri Jul 1 05:21:29 EDT 2011


Hello, 

we use CMake to build several libraries and applications for an
embedded Linux target with a cross compile toolchain. Recently we
separated this from one huge source tree to one standalone project for
each library and application, each in its own Git repository. The
classical approach for building and installing this is building the
first library, install it to the target folder, then let dependent libs
and applications use this target folder to search the include files and
libs to link against. We could easily integrate this with ptxdist [1]
which we use for building the software and finally get it on the target
hardware. Using scripts for find_package() like FindFOO.cmake this works
pretty well just like "real world" separate projects which depend on
each other.

However development inside this build environment is not so easy. It
would be a lot more convenient to work with Eclipse. Now it's easy to
setup an Eclipse project for each subproject, write code, jump around,
commit something and so on, but when dependencies arouse, building gets
difficult or even impossible, especially because a cross compiler is
required.

What we would like to have is an approach for creating some kind of
superbuild project for Eclipse. For example for some application 'foo'
which depends on 'libbar' and 'libbaz' we would like to have an Eclipse
project with access to the sources of each of the three parts and a
working build considering the dependencies. I guess this would mean
Eclipse would build libbar and libbaz, "install" it to a common build
target folder and build foo afterwards, in the best case with binaries
in the build target folder which could be simply copied to the target
hardware and run there for testing without further modifications?

Is there a way to create such a meta build project or super build
project with easy access to the source of all incorporated subprojects
from within Eclipse?

Thanks & greets
Alex

[1] http://www.ptxdist.org/

-- 
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***


More information about the CMake mailing list