[CMake] Multiple install section from the same base folder

Laszlo Papp lpapp at kde.org
Tue Jul 12 03:47:49 EDT 2011


Hi Eric,

> Honestly I do not see any benefit in this, but may be I did not
> understand what you meant?

Here is an example then:

Original version:

install(FILES
   atticamanager.h
   authentication.h

   DESTINATION ${INCLUDE_INSTALL_DIR}/gluon/player/lib
   COMPONENT Devel
)

install(FILES
   archive/archive.h

   DESTINATION ${INCLUDE_INSTALL_DIR}/gluon/player/lib/archive
   COMPONENT Devel
)

install(FILES
   models/commentitemsmodel.h
   models/gameitemsmodel.h
   models/highscoresmodel.h
   DESTINATION ${INCLUDE_INSTALL_DIR}/gluon/player/lib/models
   COMPONENT Devel
)

====
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.

Best Regards,
Laszlo Papp


More information about the CMake mailing list