diff --git a/source/dub/package_.d b/source/dub/package_.d index a132560..e9d3322 100644 --- a/source/dub/package_.d +++ b/source/dub/package_.d @@ -748,7 +748,10 @@ if (!this.targetPath.empty) dst.targetPath = this.targetPath; if (!this.targetName.empty) dst.targetName = this.targetName; if (!this.workingDirectory.empty) dst.workingDirectory = this.workingDirectory; - if (!this.mainSourceFile.empty) dst.mainSourceFile = this.mainSourceFile; + if (!this.mainSourceFile.empty) { + dst.mainSourceFile = this.mainSourceFile; + dst.addSourceFiles(this.mainSourceFile); + } void collectFiles(string method)(in string[][string] paths_map, string pattern) {