Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Passing build configuration options to a project template via a method.

Hmm, the idea behind pkg-config is that I can take the same project to a different machine where the packages are installed in a different location and have the build automatically adjust to the new location. I've been using that capability planning with Wayland. The paths are dynamic and shouldn't be hardcoded in the build settings. Mind you, that makes things a lot more difficult.

At any rate, what I've done in the past is implement a pagesAfterTemplateSelectionProvider. When the wizard is finished it asks the pages for a dictionary of string/value pairs that are passed down to the template processes.

Doug.

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Petri Tuononen
> Sent: Monday, June 13, 2011 2:01 AM
> To: CDT General developers list.
> Subject: Re: [cdt-dev] Passing build configuration options to a project
> template via a method.
> 
> What I am trying to achieve is that when the user creates a C/C++ project
> with gtk+ or gtkmm template the necessary flags to compiler and linker
> would be added automatically.
> 
> As far as I know it cannot be determined afterward which template was
> selected. The actions related to templates are performed in the end of
> project wizard creation by internal classes.
> 
> One can type build configurations to template.xml but in this particular case
> the flags are different across operating systems and I would rather generate
> the flags through pkg-config than hardcode the values. After all the
> automatic addition of flags is a viable option only if it is 100% bulletproof.
> 
> Petri
> 
> On 13.6.2011 11:32, Schaefer, Doug wrote:
> > I'm not sure you're asking the right question. In the past I've been able to
> create a page for the wizard and put some smarts in there and pass strings to
> the template processes. I'll have to dig that code up and get more info.
> >
> > Doug.
> >
> >> -----Original Message-----
> >> From: cdt-dev-bounces@xxxxxxxxxxx
> >> [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> >> On Behalf Of Petri Tuononen
> >> Sent: Saturday, June 11, 2011 2:39 PM
> >> To: CDT General developers list.
> >> Subject: [cdt-dev] Passing build configuration options to a project
> >> template via a method.
> >>
> >> Is there any way create a project template and pass build
> >> configuration options (includes, libraries etc.) that are passed via a
> method?
> >>
> >> I know that one can pass static String values in template.xml but I
> >> haven't found a way one could generate nondeterministic values
> >> through a method without creating a new project wizard and
> >> implementing a wizard handler. I don't want to create a new wizard
> >> because I just want to include a new project template to C/C++ project
> wizard.
> >>
> >> Best Regards,
> >> Petri
> >> _______________________________________________
> >> cdt-dev mailing list
> >> cdt-dev@xxxxxxxxxxx
> >> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top