[CMake] Install optional targets
Stephen Kelly
steveire at gmail.com
Sun Aug 28 19:47:12 EDT 2011
Tim Gallagher wrote:
> Hi,
>
> I asked about this awhile back and haven't had any luck with it, so I'll
> try again.
>
> What we are trying to do is have a project (called Utilities) that has a
> bunch of targets (the actual utility executables). Let's say there are 4
> utils: pre, post, grid, and restart. We would like to do something like:
>
> make pre
> make post
> make install
>
<snip>
> Any suggestions?
>
KDE uses macro_optional_add_subdirectory(grid) for this.
http://quickgit.kde.org/index.php?p=extra-cmake-
modules.git&a=blob&h=e1733bcce714c216bd253420ea0a37f5bd1ba68b&hb=f0937a4fe5db2ab7f566110876d2984779f33a3e&f=modules/ECMOptionalAddSubdirectory.cmake
According to the notes
http://community.kde.org/KDE_Core/Platform_11/Buildsystem/FindFilesSurvey
this won't be accepted into CMake. If you like that idea better than what
you currently have you can copy the file. We'll be making releases of extra-
cmake-modules eventually.
All the best,
Steve.
More information about the CMake
mailing list