[Cmake] adding a kdevelop generator

William A. Hoffman billlist at nycap.rr.com
Thu Sep 9 11:09:05 EDT 2004


You will also need to sub-class a GlobalGenerator.  You may
want to look at the Borland stuff for an example.   So, the output
will be makefiles like they are now, plus a project file for each directory?


I would say that you want to sub-class from cmLocalUnixMakefileGenerator,
and define this function:
virtual void Generate(bool fromTheTop);

Have it call the cmLocalUnixMakefileGenerator::Generate(bool fromTheTop)
version of the function, and then add the code to generate the extra
kdevelop project files in that function.  You will have a pointer to
m_Makefile that contains the parsed CMakeLists.txt file for that directory.

You will want to loop over the targets in the makefile to get the list
of sources for each target.  For an example see here:

cmLocalUnixMakefileGenerator::OutputTargetRules()


Good luck....

-Bill


At 04:52 PM 9/8/2004, Alexander Neundorf wrote:
>Hi, 
> 
>I had a look at the kdevelop project files, and adding kind-of support 
>for kdevelop to cmake shouldn't be too hard. 
>I plan to reuse the unix makefile generator. Additionally to the 
>makefiles some more files have to be generated (one project file and one 
>file containing the files belonging to the project). 
> 
>Just to get started, what's the best way to accomplish this ? Should I 
>inherit from LocalUnixMakefileGenerator and add some code to generate the 
>two additional files ? Which function would be a good place to add this 
>code ? I basically need to list all sourcefiles and the parsed 
>CMakeLists.txt I think. 
> 
>Bye 
>Alex 
> 
>
>-- 
>Supergünstige DSL-Tarife + WLAN-Router für 0,- EUR*
>Jetzt zu GMX wechseln und sparen http://www.gmx.net/de/go/dsl
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake 



More information about the Cmake mailing list