Quoting Alexander Neundorf <[EMAIL PROTECTED]>:

On Friday 17 August 2007 09:45, Pau Garcia i Quiles wrote:
Quoting Marcin Gil <[EMAIL PROTECTED]>:
> Hi!
>
> I am a bit frustrated, since I haven't found any good value tutorial
> how to develop QT4 software using KDevelop and CMake instead of QMake.
>
> QMake automatically parses .ui files, creates includes, .moc files etc.
>
> How can this be achieved by using CMake?
>
> Can anyone point me to a good tutorial or provide some examples?

It can be done but the current CMake template and build system
(in-tree, creating files everywhere and messing everything) is awful.
I am talking about KDevelop 3.4 here.

Do you mean the project templates for cmake projects which come with
KDevelop ?
I didn't look after them for a long time...

Yes, those templates.

I removed the CMakeFiles directory and the Makefile KDevelop creates
and used my own stuff:
1. Create a "build" directory in your project's directory
2. Use this Makefile:

========
all:
         cd build; cmake ..; make

elampodaemon.wt: all

clean:
         rm -rf build/*
========
(replace "elampodaemon.wt" with your target)

There is no need for that.
You can just create a buildtree wherever you like and run cmake there:
src/$ mkdir build
src/$ cd build
src/build/$ cmake -GKDevelop3 ..
...

and project files cmake generates will work as expected.

Yes, but the Makefile I'm using allows you to do everything in KDevelop, no need to go to the command line.

I am not using CMake-generated KDevelop project files, though.

Even more, using DCOP it should be possible to close and reopen the project once CMake generates a new .kdevelop file just like CMake did in Visual Studio:
dcop kdevelop-5898 KDevProject closeProject
dcop kdevelop-5898 KDevCore openProject /home/pgquiles/personal/escarlampio/elampo/elampo.kdevelop

(The "closeProject" did not work for me, I don't know why and I have not looked at the sources).


--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to