[CMake] KDevelop, QT and CMake

Alexander Neundorf a.neundorf-work at gmx.net
Fri Aug 17 09:10:01 EDT 2007


On Friday 17 August 2007 08:36, you wrote:
> On 8/17/07, Alexander Neundorf <a.neundorf-work at gmx.net> wrote:
> > http://www.cmake.org/Wiki/CMake#Tutorials
> > Follow the link "Qt with CMake".
> >
> > To get this as a project into kdevelop, ran cmake -G KDevelop3 .....
>
> Does this mean that anytime I create a new file and want to add it to
> project I need to: close KDevelop, modify CMakeLists.txt, execute cmake,
> reload project within KDevelop?

Mdify CMakeLists.txt in KDevelop, build again (which will automatically rerun 
cmake and regenerate the makefiles, which will then be used), done.
The only issue is that kdevelop won't automatically reload its project file, 
this means it doesn't know that a new file is now part of the project. This 
will happen on the next start of kdevelop (or if you add the file manually to 
the project).

> Is there a way to combine KDevelop together with CMake as currently
> QMake is nicely fitted within KDevelop (one can add files to project
> directly from KDevelop and re-execute qmake automatically).

No, there is no reliable way how any GUI could guess at which place under 
which conditions you might want to add the new source file to the target.
It's not always just:
add_executable(foo file1.cpp file2.cpp) 
but can be much more complicated, where some files are only added under 
special conditions, like which operating system, options enabled by the user, 
which software installed, etc.).

Bye
Alex


More information about the CMake mailing list