GLFW Fails to initialise. Raspberry Pi, EGL
<p>I'm compiling glfw3 (3.2.1) on the raspberry pi with no xserver with the option:</p>

<pre><code>option(GLFW_USE_EGL "Use EGL for context creation" ON )
</code></pre>

<p>as per GLFW docs under <strong><a href="http://bit.ly/21khmqb" rel="nofollow">EGL Specific CMake options</a></strong>.</p>

<p>The steps I've taken are:</p>

<pre><code>wget https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip
unzip glfw-3.1.2.zip
cd glfw-3.1.2
nano CMakeLists.txt
</code></pre>

<p>then added the following to CMakeLists.txt:</p>

<pre><code>option(GLFW_USE_EGL "Use EGL for context creation" ON )
</code></pre>

<p>Then install:</p>

<pre><code>sudo cmake .
sudo make clean install
</code></pre>

<p>When I run the examples I get the error:</p>

<pre><code>Failed to initialize GLFW
</code></pre>

<p>When I run my app I get:</p>

<pre><code>X11: Failed to open display :0.0
</code></pre>

<p>It looks like GLFW is not using EGL and trying to get a window from X11...</p>

<p>Am I using the GLFW_USE_EGL incorrectly?</p>