[CMake] CPack/NSIS: start menu entry without cpack_package_executables

Daniel Franke franke.daniel at gmail.com
Mon Jul 18 13:30:17 EDT 2011


Hi Eric.

On Monday 18 July 2011 09:36:37 Eric Noulard wrote:
> http://public.kitware.com/Bug/view.php?id=11808

Thanks for the link.


> > Maybe I should have provided an example. At 3am, things start to get
> > fuzzy around the edges ...
> > 
> > I defined a bunch of macros, e.g.
> > 
> >    myproject_add_executable()
> > and
> >    myproject_install_target()
> > 
> > that do what you'd think they should do but also keep track of proper
> > include and link directories, dependencies etc and in the latter case,
> > if the proper arguments and options are passed, add a component for the
> > installer via cpack_add_component(). Example:
> > 
> >    myproject_add_executable(foo SOURCES foo.c foo.h
> >                                 LIBRARIES bar)
> >    myproject_install_target(TARGETS foo
> >                             COMPONENT "foo"
> >                             COMPONENT_DESCRIPTION "..."
> >                             COMPONENT_GROUP "gui")
> > 
> > Here, everything is done in one place -- but this requires that CPack is
> > included before the first target is installed, i.e. defined,
> 
> Could you explain why you need CPack to be included here?
> 
> If the requirement comes from the needed definition of
> "cpack_add_component" then you can try to do the following:

Exactly for this reason.

 
> 1) include(CPackComponent) early enough
>    in order to get the "cpack_add_component" macro definition you need.

This is new in 2.8.5? The latest package I could check is 2.8.3 and there 
seems to be no such file!?

Trouble being that people expect things to work on their local platforms 
without need to update to the latest and greatest releases first (think CentOS 
5 users). Maybe I need to come up with a different solution. An installer 
without components, for example :P

Thanks for the pointers nonetheless. Food for thought ...

Cheers

	Daniel


More information about the CMake mailing list