<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">I found how. By <span style="font-family: Menlo;" class="">targets</span> in Package.swift file.</div><div class=""><br class=""></div><div class="">But I have a problem that I have 2 libs and one executable.</div><div class=""><br class=""></div><div class=""><div class="">../Sources/Executable/main.swift</div><div class="">../Sources/Executable/classA.swift</div><div class="">../Sources/libA/some1.swift</div><div class="">../Sources/libA/some2.swift</div></div><div class="">../Sources/libB/some3.swift</div><div class=""><div class="">../Sources/libB/some4.swift</div></div><div class=""><br class=""></div><div class="">libB should be imported in libA and Executable. But libA can’t see libB.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span> package = Package(</div><div style="margin: 0px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> name: </span>"example"<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span></div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> targets: [ Target( name: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"Executable"</span>, dependencies: [.Target(name: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"libB"</span>), .Target(name: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="color: rgb(209, 47, 27);" class="">libA</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>)]),</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> Target( name: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="color: rgb(209, 47, 27);" class="">libA</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>, dependencies: [.Target(name: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="color: rgb(209, 47, 27);" class="">libB</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>)]),</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> Target( name: <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span><span style="color: rgb(209, 47, 27);" class="">libB</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"</span>)</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class=""> ]</div><div style="margin: 0px; line-height: normal; font-family: Menlo;" class="">)</div></div><div class=""><br class=""></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Best R<span style="text-align: -webkit-auto;" class="">egards,</span></div><div class=""><div class=""><div style="orphans: auto; widows: auto;" class="">Volodymyr Boichentsov</div><div class=""><br class=""></div></div></div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 29 Dec 2015, at 11:20, Volodymyr Boichentsov <<a href="mailto:sakristx@gmail.com" class="">sakristx@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I have next Source Layout</div><div class=""><br class=""></div><div class="">../Sources/Executable/main.swift</div><div class="">../Sources/Executable/classA.swift</div><div class="">../Sources/liba/some1.swift</div><div class="">../Sources/liba/some2.swift</div><div class=""><br class=""></div><div class="">How to include liba to Executable main.swift? </div><div class=""><br class=""></div><div class="">It’s not clear from this file</div><div class=""><a href="https://github.com/apple/swift-package-manager/blob/master/Documentation/SourceLayouts.md" class="">https://github.com/apple/swift-package-manager/blob/master/Documentation/SourceLayouts.md</a></div><div class=""><br class=""></div><div class="">I’ve tried just simple import. Does not work.</div><div class=""><br class=""></div><div class="">P.S.: I know how to make dependency lib, but I don’t want it for my current situation.</div><div class=""> </div><div class="">
<div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Best R<span style="text-align: -webkit-auto;" class="">egards,</span></div><div class=""><div class=""><div style="orphans: auto; widows: auto;" class="">Volodymyr Boichentsov</div><div class=""><br class=""></div></div></div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></div></div></blockquote></div><br class=""></body></html>