[CMake] Setting up Visual Studio project structure
Hendrik Sattler
post at hendrik-sattler.de
Mon Mar 26 12:46:20 EST 2007
Am Montag 26 März 2007 19:17 schrieb Michael Bieber:
> HS> Did you try adding a PROJECT call to every lib's CMakeLists.txt file?
> HS> Then run make -G ... on the top-level CmakeLists.txt file.
>
> No, I'm fiddling with a single lib for the moment.
>
>
> HS> It's in the FAQ why this is not a good idea (well, you will miss some
> good HS> features) and you are forced to deleted/move file that are
> currently not in HS> use. Qmake never proposed this, either.
>
> (provided?) It does, in a way even cmake should be able to deal with.
Ok, I misunderstood you here.
> qmake gathers all files in project mode (but has problems with
> dependencies).
And with lots of other things (e.g. automatic relinking when statically
linking libs).
> After that you can remove single files from the generated
> list as a sub-clause. It should be possible with cmake too.
> I think, nowadays you should expect this kind of dynamic behavior from
> a build system. Professional projects have the size and dynamical
> changes (adding/deleting/excluding files) requiring some half-automatic
> support from the build system (true even for SCM's BTW).
--------------------
#!/bin/sh
for i in *.c; do
echo <whatever>
done
--------------------
Something like that? You can write the proper file lists to an extra .cmake
file and include that into the CMakeLists.txt file or use a template file.
Should cmake really handle all specialties (like moc, uic and rcc for Qt) for
creating such file lists?
Could be an interesting idea for a new feature (cmake bootstrapping).
Or you use qmake and write a qmake2cmake.
HS
More information about the CMake
mailing list