title: Swift Package Manager - How to use it
body: <p>I have a project that I want to use <a href="https://github.com/SwiftGL/Math" rel="nofollow noreferrer">this package</a> in my app. I googled and follow the instructions:</p>
  
  <pre><code>//in Terminal
  
  ? mkdir SGLMath
  ? cd SGLMath
  ? swift package init --type executable
  </code></pre>
  
  <p>Then I open the <code>package.swift</code> file and change to this:</p>
  
  <pre><code>// swift-tools-version:3.1
  
  import PackageDescription
  
      let package = Package(
          name: "SGLMath",
          dependencies: [
              .Package(url: "https://github.com/SwiftGL/Math.git", majorVersion: 1)
          ]
      )
  </code></pre>
  
  <p>then <code>Terminal</code>:</p>
  
  <pre><code>? swift package fetch
  </code></pre>
  
  <p>Then I got this error:</p>
  
  <blockquote>
    <p>error: the package has an unsupported layout, unexpected source
    file(s) found:
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/EqualWithAccuracy.swift,
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/FunctionsTests.swift,
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/Matrix2x2Tests.swift,
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/Matrix3x3Tests.swift,
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/Matrix4x4Tests.swift,
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/SwizzleTests.swift,
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/Vector2Tests.swift,
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/Vector4Tests.swift,
    /Users/xuanxi/SGLMath/.build/checkouts/Math.git-9167533630816302265/Tests/glmMatrixTests.swift</p>
    
    <p>fix: move the file(s) inside a module</p>
  </blockquote>
  
  <p>How can I resolve this?</p>
  
  <ol start="2">
  <li>What if I want to add this package into my existing <code>Xcode</code> project?</li>
  </ol>