title: CMake Error: Could Not Find OpenSSL
body: <p><strong>My Objective:</strong></p>
  
  <p>I'm trying to configure Mosquitto broker to use websockets.</p>
  
  <p><strong>The Warnings and Errors:</strong></p>
  
  <p><a href="https://docs.google.com/document/d/1HJ75NO1wBsnNfFFszeXP4p8re7m4gTE_CMbFoSswJJs/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/document/d/1HJ75NO1wBsnNfFFszeXP4p8re7m4gTE_CMbFoSswJJs/edit?usp=sharing</a></p>
  
  <p><strong>Software:</strong></p>
  
  <ul>
  <li>Windows 10 x64</li>
  <li><a href="https://github.com/warmcat/libwebsockets" rel="nofollow noreferrer">libwebsockets-master</a></li>
  <li>Cmake 3.6.2 win32</li>
  <li>OpenSSL 1.1.0a</li>
  <li>Visual Studio 14 2015 (with C++ compiler)</li>
  </ul>
  
  <p><strong>What I've tried:</strong></p>
  
  <p>I'm using CMake gui cause I'm not really familiar with the commands. I configure the source and destination and set the following variables as paths and filepaths respectively:</p>
  
  <ul>
  <li>OPENSSL_ROOT_DIR = OpenSSL-Win32</li>
  <li>OPENSSL_LIBRARIES = OpenSSL-Win32/lib <strong><em>or</em></strong> OpenSSL-Win32/lib/openssl.lib</li>
  <li>OPENSSL_CONF = bin\openssl.cfg</li>
  <li>OPENSSL_INCLUDE_DIR = OpenSSL-Win32/include/openssl</li>
  </ul>
  
  <p>I tried setting the OPENSSL_LIBRARIES in the libwesocket's CMkakeLists.txt file too. I've used multiple different versions of CMake and OpenSSL. I tried opening CMake with VS command line (as admin).</p>
  
  <p>I've previously built a <em>.sln</em> file with older out-dated OpenSSL so there's no issue with the compiler. </p>
  
  <p>I've looked at the questions <a href="https://stackoverflow.com/questions/32801638/cmake-error-at-cmakelists-txt30-project-no-cmake-c-compiler-could-be-found">here</a>, <a href="https://stackoverflow.com/questions/16248775/cmake-not-able-to-find-openssl">here</a>, <a href="https://github.com/h2o/h2o/issues/213" rel="nofollow noreferrer">here</a> and <a href="https://stackoverflow.com/questions/39452917/unable-to-build-libwebsockets-library-due-to-cmake-missing-openssl">here</a>. If it boils down to using the command line specifically to set OPENSSL_ROOT_DIR, could someone shed some light on this please?</p>