qtcreator
supports both qmake
and cmake
for cross platform development and
qmake
works fine for both msvc
and MinGW
builds on Windows
. However, I'd prefer to support just one tool: cmake
.
The CMakeLists.txt
at via-httplib works fine on linux
and when using cmake
to build msvc
on Windows
.
However, when using cmake
to build MinGW
on Windows
, I get the following error:
CMake Error at C:/Program
Files/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:/DevLibraries/boost/boost_1_69_0
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.
Both the BOOST_LIBRARYDIR
and BOOST_ROOT
environment variables are set and are found when using the Visual Studio 15 2017 Win64
generator and default native compilers
The error message indicates that when using the MinGW Makefiles
and default native compilers, cmake
finds the BOOST_ROOT
environment variable but not BOOST_LIBRARYDIR
. So it does not seem to be the same problem described here: Cmake doesn't find Boost
Is this a bug in FindBoost.cmake
? Is there a "work around"?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…