title: compiling SDL2 with sublime and g++ on OSX, linking errors
body: <p>I use sublime text 3 with a build_system on OSX to compile a c++ game using SDL2.
  The game works on my machien but as soon as I try to use it on an other machine, the SDL2 libary is not found.</p>
  
  <p>How can I incorporate the SDL2 framework into my game or my own game folder structure, so that it is easy to copy to any machine?</p>
  
  <p>I use this build_system:</p>
  
  <pre><code>    "build_systems": [
          {
              "name": "Debug",
              "working_dir": "${project_path}",
              "cmd": ["g++ -c src/*.cpp -std=c++14 -m64 -g -Wall -I include &amp;&amp; g++ *.o -o bin/debug/main -lSDL2main -lSDL2 -lSDL2_image &amp;&amp; ./bin/debug/main"],
              "selector": "source",
              "shell": true
  
          },
          {
              "name": "Release",
              "working_dir": "${project_path}",
              "cmd": ["g++ -c src/*.cpp -std=c++14 -m64 -O3 -Wall -I include &amp;&amp; g++ *.o -o bin/release/main -s -lSDL2main -lSDL2 -lSDL2_image &amp;&amp; ./bin/release/main"],
              "selector": "source",
              "shell": true
  
          }
  </code></pre>
  
  <p>The error on the machine, where SDL2 is not installed:</p>
  
  <pre><code>dyld: Libary not loaded: /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib
  </code></pre>
  
  <p>My preferred scenario would be that I have a compiled game <code>main</code> with a subfolder <code>lib</code> or <code>framework</code>, which includes the necessary SDL2 files (I am also not sure which SDL2 files this should be).
  Thanks for any help.</p>