Sign up

Examples dub.json with subpackages

Hi all,

I would like to simplify the building of the sample demos i.e in gtk-d-3.6.5/gtk-d/demos/gtk. As it uses subpackages for it's own subdemos ( hello_world, other_test, etc... ) I would like to add a dependency in the main package for each one of these subpackages, so I addded an entry like this to demos/gtk/dub.json:

 "dependencies": {
		"demos:hello_world": "*",
		"demos:popup_menu": "*"
	},

So simply typing dub build should generate those executables (sort of make all) but I get this error from dub:
Main package must have a binary target type, not none. Cannot build.
If I then change targetType to "executable" I get this other error:

Configuration 'application' of package demos contains no source files. Please add {"targetType": "none"} to it's package description to avoid building it.
Main package must have a binary target type, not none. Cannot build.

Is there a way to achieve this behaviour with dub?
Thanks
A. Corbi

Re: Examples dub.json with subpackages

On 06/02/2017 11:35 AM, Antonio Corbi wrote:

Is there a way to achieve this behaviour with dub?
Thanks
A. Corbi

As far as i know dub doesn't support that.

Re: Examples dub.json with subpackages

On Fri, 2 Jun 2017 18:46:26 +0200, Mike Wey wrote:

On 06/02/2017 11:35 AM, Antonio Corbi wrote:

Is there a way to achieve this behaviour with dub?
Thanks
A. Corbi

As far as i know dub doesn't support that.

Hi Mike,

It seems so, but dub's manual says it's possible or so I understand from this entry.