RejectedSoftware Forums

Sign up

Is there a way to output to a platform specific folder/filename

http://code.dlang.org/package-format?lang=sdl especially mentions, that
targetPath does not support the platform attributes.

I would like to be able to distinguish osx-binaries from linux binaries.
Also having different settings for linux-arm and linux-x86_64 would be
great.

Thanks,
Christian

Re: Is there a way to output to a platform specific folder/filename

Am 15.07.2017 um 18:49 schrieb Christian Köstlin:

http://code.dlang.org/package-format?lang=sdl especially mentions, that
targetPath does not support the platform attributes.

I would like to be able to distinguish osx-binaries from linux binaries.
Also having different settings for linux-arm and linux-x86_64 would be
great.

Thanks,
Christian

Configurations would work in that case. Each configuration has a list of
platform specifiers that it supports, and any global settings are
inherited, so that only the necessary bits need to be customized:

 name "foo"
 dependency "bar" version="~>1.0"

 configuration "osx" {
     platforms "osx"
     targetName "foo_for_mac"
 }
 configuration "armlinux" {
     platforms "linux-arm"
     targetName "armlinux_foo"
     dependency "myarmlib" version="~>2.0"
 }
 configuration "linux" {
     plaforms "linux-x86" "linux-x86_64"
     targetName "pc-linux"
 }