title: Cleanly handling /usr/local/ with Swift package manager and libevent
body: <p>I have 2 dependencies in my project <code>libevent</code> and <code>libressl</code>. Both of which are installed locally ( respectively under <code>/usr/local/include</code> and <code>/usr/local/opt/libressl/include</code> )</p>
  
  <p>What I am looking for to achieve is for SPM to automatically understand to search in those directories.</p>
  
  <p>I know I can pass flags to swift build to achieve this; but my ultimate goal is that I can properly generate xcode projects from the command line without having to constantly add custom build flags in Xcode.</p>
  
  <p>I'm pretty sure it is possible, since I do not have to enter the custom settings for PostgreSQL.</p>
  
  <p>Swift-tools version is at 4.0.x</p>
  
  <p>Package.swift for reference:</p>
  
  <pre><code>// swift-tools-version:4.0
  // The swift-tools-version declares the minimum version of Swift required to build this package.
  
  import PackageDescription
  
  let package = Package(
      name: "CEvent",
      providers: [
          .brew(["libevent"]),
          .apt(["libevent-dev"])
      ],
      products: [
          // Products define the executables and libraries produced by a package, and make them visible to other packages.
          .library(
              name: "CEvent",
              targets: ["CEvent"]),
          ],
      dependencies: [
      ],
      targets: [
          .target(
              name: "CEvent",
              dependencies: []
          ),
      ]
  )
  </code></pre>
  
  <p>Module map:</p>
  
  <pre><code>module CEvent [system] {
      header "shim.h"
      link "event"
      export *
  }
  </code></pre>
  
  <p>And my current build script ( build.sh ):</p>
  
  <pre><code>#!/usr/local/bin/fish
  swift build -Xcc -O0 -Xcc -fblocks -Xswiftc -lbcrypt -Xswiftc -I/usr/local/include -Xswiftc -L/usr/local/lib -Xswiftc -ltls -Xswiftc -lcrypto -Xswiftc -lssl -Xswiftc -L/usr/local/opt/postgresql/lib -Xswi$
  </code></pre>
  
  <p>As for the reason that I want this. If I add/update/remove dependencies in swift I want to generate a new xcode project, and not have to fix its settings on respective build machines; as well as apt/ubuntu /usr/lib instead.</p>