[CMake] Can't find boost libs on VS2017 CMake 3.12

Søren sd at syntonetic.com
Thu Aug 2 09:24:42 EDT 2018


Dear cmake community

I can't make CMake find the built boost libraries on Windows. At this line:

     find_package(Boost REQUIRED COMPONENTS thread)

I get this error message:
"Unable to find the requested Boost libraries.

   Boost version: 1.67.0

   Boost include path: C:/download/boost/boost_1_67_0

   Could not find the following static Boost libraries:

           boost_thread

   Some (but not all) of the required Boost libraries were found. You may
   need to install these additional Boost libraries.  Alternatively, set
   BOOST_LIBRARYDIR to the directory containing Boost libraries or 
BOOST_ROOT
   to the location of Boost."

Other facts and observations:
* Error both observed with stand alone Cmake 3.12, and the version cmake 
3.11 that ships with VS2017.
* VS2017 version 15.7.5 (currently the latest)
* The same error with older Boost versions 1.65.x or 1.66
* Building and linking the same program using VS2017 without cmake works 
fine.
* It's not only threat that has the problem. Tested also date_time and 
chrono with same errors.
* Building a program with cmake that only requires boost 
headers-only-libs works fine.
* Building the same project on linux works fine.

Any ideas?
Thanks in advance
Soren



More information about the CMake mailing list