digitalmars.D.learn - [dub] specify dependency configuration
- cal (27/27) Jan 18 2015 Given myapp and a dependency, specified by dub.json's:
- Rikki Cattermole (40/67) Jan 18 2015 I just want to verify, you are using configurations only to determine if...
- Rikki Cattermole (3/3) Jan 18 2015 I forgot to mention dub should automatically choose the first
- cal (7/10) Jan 18 2015 Some dependency (that I don't control) might define for example
- cal (3/7) Jan 18 2015 Ahh I guess this is it, thanks for that!
Given myapp and a dependency, specified by dub.json's: myapp: dub.json { ... "dependencies": { "dependency_a": ">=0.6.0" } ... } dependency_a: dub.json { ... "configurations": [ { "name": "config_a", "targetType": "library", ... }, { "name": "config_b", "targetType": "executable", ... }, ... } How do I specify (in myapp: dub.json) that I want the "config_a" configuration of dependency_a?
Jan 18 2015
On 19/01/2015 1:59 p.m., cal wrote:Given myapp and a dependency, specified by dub.json's: myapp: dub.json { ... "dependencies": { "dependency_a": ">=0.6.0" } ... } dependency_a: dub.json { ... "configurations": [ { "name": "config_a", "targetType": "library", ... }, { "name": "config_b", "targetType": "executable", ... }, ... } How do I specify (in myapp: dub.json) that I want the "config_a" configuration of dependency_a?I just want to verify, you are using configurations only to determine if its being built a certain way? And not lets say as a subpackage? Ignoring that, there is something called subConfigurations section. Example from: http://code.dlang.org/package-format { ... "name": "somepackage" "configurations": [ { "name": "metro-app", "targetType": "executable", "platforms": ["windows"], "versions": ["MetroApp"], "libs": ["d3d11"] }, { "name": "desktop-app", "targetType": "executable", "platforms": ["windows"], "versions": ["DesktopApp"], "libs": ["d3d9"] }, { "name": "glut-app", "targetType": "executable", "versions": ["GlutApp"] } ] } { ... "dependencies": { "somepackage": ">=1.0.0" }, "subConfigurations": { "somepackage": "glut-app" } }
Jan 18 2015
I forgot to mention dub should automatically choose the first configuration available if you do not specify it. In this case that's the library one. Or atleast it should do that.
Jan 18 2015
On Monday, 19 January 2015 at 02:10:41 UTC, Rikki Cattermole wrote:I just want to verify, you are using configurations only to determine if its being built a certain way? And not lets say as a subpackage?Some dependency (that I don't control) might define for example two configurations, a sourceLibrary type and a library type (my own app does not define it's own configurations). I'm just wondering if there is a way to tell dub i'm only interested in using that dependency as a sourceLibrary for example.
Jan 18 2015
On Monday, 19 January 2015 at 02:10:41 UTC, Rikki Cattermole wrote:"subConfigurations": { "somepackage": "glut-app" } }Ahh I guess this is it, thanks for that!
Jan 18 2015