title: CMake fails to find boost libraries (CGAL, Windows)
body: <p>I saw dozens of identical questions about this issue. None of their answers worked for me I'm afraid.</p>
  
  <p>I'm trying to install CGAL. I'm following the <a href="https://xinyustudio.wordpress.com/2012/07/18/setup-cgal-in-windows-7-step-by-step-tutorial/" rel="nofollow">following tutorial</a> describing the process step-by-step. The only difference is that I'm using CodeBlocks and I've selected "Specify native compilers" and pointed them to <code>mingw32-gcc.exe</code> and <code>mingw32-g++.exe</code> which seems to be fine. When I run cmake-gui and then click configure, I get the following output, with the Advanced option ticked:</p>
  
  <pre class="lang-html prettyprint-override"><code>The CXX compiler identification is GNU 4.4.1
  The C compiler identification is GNU 4.4.1
  Check for working CXX compiler: E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-g++.exe
  Check for working CXX compiler: E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-g++.exe -- works
  Detecting CXX compiler ABI info
  Detecting CXX compiler ABI info - done
  Check for working C compiler: E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-gcc.exe
  Check for working C compiler: E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-gcc.exe -- works
  Detecting C compiler ABI info
  Detecting C compiler ABI info - done
  == Setting paths ==
  Build CGAL from release in directory CGAL-4.6
  Packagenames: CGAL-4.6
  == Setting paths (DONE) ==
  
  == Generate version files ==
  CGAL_MAJOR_VERSION=4
  CGAL_MINOR_VERSION=6
  CGAL_BUGFIX_VERSION=0
  CGAL_SONAME_VERSION=11
  CGAL_SOVERSION     =11.0.0
  CGAL_REFERENCE_CACHE_DIR=
  Building shared libraries
  Targetting MinGW Makefiles
  Using E:/Program Files (x86)/CodeBlocks/MinGW/bin/mingw32-g++.exe compiler.
  USING CMake version: 2.8.8
  System: Windows
  USING GCC_VERSION = '4.4.1'
  Using gcc version 4 or later. Adding -frounding-math
  == Generate version files (DONE) ==
  
  == Set up flags ==
  Build type: Release
  USING CXXFLAGS = ' -frounding-math -O3 -DNDEBUG'
  USING LDFLAGS = '  '
  == Set up flags (DONE) ==
  
  == Detect external libraries ==
  External libraries supported: GMP;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
  Preconfiguring library: GMP ...
  Found GMP: e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/lib/libgmp-10.dll  
  GMP has been preconfigured:
    UseGMP-file:      
    GMP include:      e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/include
    GMP libraries:    e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/lib/libgmp-10.dll
    GMP definitions:  
  USING GMP_VERSION = '5.0.1'
  Preconfiguring library: MPFR ...
  Found MPFR: e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/lib/libmpfr-4.dll  
  MPFR has been preconfigured:
    UseMPFR-file:      
    MPFR include:      e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/include
    MPFR libraries:    e:/Users/Bombax/Cpp/Libraries/CGAL-4.6/auxiliary/gmp/lib/libmpfr-4.dll
    MPFR definitions:  
  USING MPFR_VERSION = '3.0.0'
  CMake Error at E:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1200 (message):
    Unable to find the requested Boost libraries.
  
    Boost version: 1.58.0
  
    Boost include path: e:/Users/Bombax/Cpp/Libraries/boost_1_58_0
  
    The following Boost libraries could not be found:
  
            boost_thread
            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):
    cmake/modules/CGAL_SetupBoost.cmake:6 (find_package)
    cmake/modules/CGAL_SetupDependencies.cmake:85 (include)
    CMakeLists.txt:640 (include)
  
  
  Boost include:     e:/Users/Bombax/Cpp/Libraries/boost_1_58_0
  Boost libraries:   
  Boost definitions: 
  USING BOOST_VERSION = '1.58.0'
  == Detect external libraries (DONE) ==
  
  == Write compiler_config.h ==
  Performing Test CGAL_CFG_BOOST_VARIANT_SWAP_BUG - Failed
  Performing Test CGAL_CFG_DENORMALS_COMPILE_BUG - Success
  Performing Test CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG - Success
  Performing Test CGAL_CFG_IEEE_754_BUG - Success
  Performing Test CGAL_CFG_ISTREAM_INT_BUG - Success
  Performing Test CGAL_CFG_MATCHING_BUG_5 - Success
  Performing Test CGAL_CFG_MATCHING_BUG_6 - Success
  Performing Test CGAL_CFG_MATCHING_BUG_7 - Success
  Performing Test CGAL_CFG_MATCHING_BUG_8 - Success
  Performing Test CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG - Success
  Performing Test CGAL_CFG_NO_LIMITS - Success
  Performing Test CGAL_CFG_NO_NEXTAFTER - Success
  Performing Test CGAL_CFG_NO_STL - Success
  Performing Test CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG - Success
  Performing Test CGAL_CFG_NUMERIC_LIMITS_BUG - Success
  Performing Test CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG - Success
  Performing Test CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG - Success
  Performing Test CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG - Success
  Performing Test CGAL_CFG_USING_BASE_MEMBER_BUG_2 - Success
  == Write compiler_config.h (DONE) ==
  
  == Generating build files ==
  Configuring libCGAL
  Requested component: MPFR
  Requested component: GMP
  libCGAL is configured
  Sources for CGAL component library 'CGAL_Core' detected
  Configuring libCGAL_Core
  Requested component: MPFR
  Requested component: GMP
  libCGAL_Core is configured
  Sources for CGAL component library 'CGAL_ImageIO' detected
  Configuring libCGAL_ImageIO
  Found OpenGL: opengl32  
  Could NOT find ZLIB (missing:  ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
  OpenGL include:     
  OpenGL libraries:   glu32;opengl32
  Requested component: MPFR
  Requested component: GMP
  libCGAL_ImageIO is configured
  NOTICE: libCGAL_ImageIO needs ZLib to read compressed files. That feature will not be activated.
  Sources for CGAL component library 'CGAL_Qt3' detected
  Configuring libCGAL_Qt3
  libCGAL_Qt3 needs Qt3, cannot be configured.
  Sources for CGAL component library 'CGAL_Qt4' detected
  Configuring libCGAL_Qt4
  libCGAL_Qt4 needs Qt4, cannot be configured.
  Sources for CGAL component libraries 'CGAL_Core;CGAL_ImageIO;CGAL_Qt3;CGAL_Qt4' detected
  == Generating build files (DONE) ==
  
  Configuring incomplete, errors occurred!
  </code></pre>
  
  <p>I did indeed setup <code>BOOST_ROOT</code> to a PATH in CMake's GUI, to <code>e:/Users/Bombax/Cpp/Libraries/boost_1_58_0</code>, which exists. And the two libraries it mentions are definitely installed. I've noticed there's no explicit include folder in my boost installation (though their is libs). I've tried checking the CGAL_Boost_USE_STATIC_LIBS option with no better results. What is happening here? What do I need to do?</p>