title: Could not find the following Boost libraries: boost_system
body: <p>I want to build this repository: <a href="https://github.com/reo7sp/tgbot-cpp" rel="nofollow noreferrer">https://github.com/reo7sp/tgbot-cpp</a>.</p>
  
  <p>It is an API for managing Telegram bots. The needed dependencies are openssl, zlib, boost. Curl is optional.</p>
  
  <h2>How I installed libraries and cmake</h2>
  
  <p><strong>Boost was compiled with:</strong></p>
  
  <pre><code>bootstrap.bat
  .\b2
  </code></pre>
  
  <p>and (since I do not know the difference; one compiles under boost/stage/lib; the second under boost/lib)</p>
  
  <pre><code>bjam install --prefix=D:/Programme/Boost/boost_1_69_0 --with-system --with-date_time --with-random link=static runtime-link=shared threading=multi
  </code></pre>
  
  <p>I added the required paths in system variables under path.</p>
  
  <p><a href="https://i.stack.imgur.com/I208y.png" rel="nofollow noreferrer">environment variables</a></p>
  
  <p><a href="https://i.stack.imgur.com/1wYW9.png" rel="nofollow noreferrer">Path</a></p>
  
  <h2>When trying to build with cmake I get the following error:</h2>
  
  <pre><code>The C compiler identification is MSVC 19.16.27026.1
  The CXX compiler identification is MSVC 19.16.27026.1
  Check for working C compiler: D:/Programme (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
  Check for working C compiler: D:/Programme (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
  Detecting C compiler ABI info
  Detecting C compiler ABI info - done
  Detecting C compile features
  Detecting C compile features - done
  Check for working CXX compiler: D:/Programme (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
  Check for working CXX compiler: D:/Programme (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
  Detecting CXX compiler ABI info
  Detecting CXX compiler ABI info - done
  Detecting CXX compile features
  Detecting CXX compile features - done
  Looking for pthread.h
  Looking for pthread.h - not found
  Found Threads: TRUE  
  Found ZLIB: D:/Programme (x86)/GnuWin32/lib/zlib.lib (found version "1.2.3") 
  Found OpenSSL: optimized;D:/Programme/OpenSSL-Win64/lib/VC/libcrypto64MD.lib;debug;D:/Programme/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib (found version "1.1.0j")  
  Could NOT find CURL (missing: CURL_LIBRARY) (found version "7.63.0")
  CMake Warning (dev) at CMakeLists.txt:62 (find_package):
    Policy CMP0074 is not set: find_package uses &lt;PackageName&gt;_ROOT variables.
    Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.
  
    Environment variable Boost_ROOT is set to:
  
      D:\Programme\Boost\boost_1_69_0
  
    For compatibility, CMake is ignoring the variable.
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  CMake Error at D:/Programme/CMake/share/cmake-3.13/Modules/FindBoost.cmake:2100 (message):
    Unable to find the requested Boost libraries.
  
    Boost version: 1.69.0
  
    Boost include path: D:/Programme/Boost/boost_1_69_0/include/boost-1_69
  
    Could not find the following Boost libraries:
  
            boost_system
  
    No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
    directory containing Boost libraries or BOOST_ROOT to the location of
    Boost.
  Call Stack (most recent call first):
    CMakeLists.txt:62 (find_package)
  
  
  CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake files:
  CURL_LIBRARY
      linked by target "TgBot" in directory G:/Programmieren (C++)/Bibliotheken/tgbot-cpp-master
  
  Configuring incomplete, errors occurred!
  See also "G:/Programmieren (C++)/Bibliotheken/tgbot-cpp-master/BUILD/CMakeFiles/CMakeOutput.log".
  See also "G:/Programmieren (C++)/Bibliotheken/tgbot-cpp-master/BUILD/CMakeFiles/CMakeError.log".
  </code></pre>
  
  <p>It seems to me that everything except of Boost works. I know that there are several users with this problem like:</p>
  
  <p><a href="https://stackoverflow.com/questions/3808775/cmake-doesnt-find-boost">Cmake doesn&#39;t find Boost</a></p>
  
  <p><a href="https://stackoverflow.com/questions/20654959/cmake-with-boost-could-not-find-static-libraries">CMake with Boost could not find static libraries</a></p>
  
  <p><a href="https://stackoverflow.com/questions/47936353/cmake-with-boost-library-windows-10-library-not-found-correctly">CMake with Boost library Windows 10 Library not found correctly</a></p>
  
  <h2>So, I did the suggested procedures:</h2>
  
  <pre><code>SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "D:/Programme/Boost/boost_1_69_0")
  SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "D:/Programme/Boost/boost_1_69_0/lib")
  
  FIND_PACKAGE(Boost)
  IF (Boost_FOUND)
      INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
      ADD_DEFINITIONS( "-DHAS_BOOST" )
  ENDIF()
  </code></pre>
  
  <p>and</p>
  
  <pre><code>set(BOOST_LIBRARYDIR D:/Programme/Boost/boost_1_69_0/lib)
  </code></pre>
  
  <p>Nothing worked. I have absolutely no clue what to do, for days desperately trying to figure out what to do without success. Please, help me.</p>