[CMake] Multiple install section from the same base folder
Eric Noulard
eric.noulard at gmail.com
Tue Jul 12 03:57:03 EDT 2011
2011/7/12 Laszlo Papp <lpapp at kde.org>:
>
> ====
> Here is what I would advise (of course by setting some option if you
> want two have it also the "original" way):
>
> install(FILES
> atticamanager.h
> authentication.h
> archive/archive.h
> models/commentitemsmodel.h
> models/gameitemsmodel.h
> models/highscoresmodel.h
>
> DESTINATION ${INCLUDE_INSTALL_DIR}/gluon/player/lib
> COMPONENT Devel
> )
>
> This way, it would be much cleaner and shorter to me.
Ok I see.
This could be done already by writing you own CMake macro
"myinstall_with_pathprefix"
which would generate the "plain" install command for you.
basically for each specified file you'll have to grab filename an dirname
(using get_filename_component) and use appropriately update DESTINATION.
I wouldn't personnally want to add more feature to INSTALL command
because I find it already complicated enough AND the feature you request
can be done on top of the existing feature....but that's my opinion though.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list