KDevelop template: Simple CMake based C++ project

Alexander Neundorf neundorf at kde.org
Thu Feb 19 20:31:53 UTC 2009


On Thursday 19 February 2009, Andreas Pakulat wrote:
> On 19.02.09 07:53:07, Gabor Garami wrote:
> > Thanks a comment
> >
> >   - I added CMake module path adding because this project template
> > doesn't assume any helper module (like KDE4 stuffs) installed, and, if
> > I guess well, this needed if project provided by standalone.
>
> No its not needed. A CMakeLists.txt to compile main.cpp into foo looks like
> this:
>
> project(foo)
> add_executable(foo main.cpp)

Now with cmake 2.6.x I would recommend adding a
cmake_minimum_required(VERSION x.y[.z] FATAL_ERROR )
at the top.
Otherwise you will get warnings once your cmake file gets a bit bigger.

Alex




More information about the KDevelop-devel mailing list