I\'m trying to use a CMake script to compile a Boost-based application on Windows. The header-only libraries work fine, but CMake fails to find the libraries (the following
I came here with a similar issue and just wanted to say my fix was similar, but not exactly the same.
My install prefix was C:\lib\boost\boost_1_57_0
. I set a BOOST_ROOT
environment variable pointing to that directory, but CMake (3.1.0) still couldn't find the headers. I realized the headers defaulted to install to C:\lib\boost\boost_1_57_0\include\boost-1_57\boost
. I'm not going to run multiple versions so I just moved the final Boost directory down one and removed the boost-1_57
directory and ended up with headers here:
C:\lib\boost\boost_1_57_0\include\boost
And CMake found everything.