FindBoost: Can not set externally Boost_LIB_PREFIX variable in the msys
cmake: 3.16.4
Boost: 1.72.0
OS: Windows 7 x64
Compiler: msys32/gcc 7.4.0
Msys installer: https://www.msys2.org
, msys2-i686-20190524
I am trying to use FindBoost
on the Boost libraries from the msys
environment.
The libraries could not be found because particularly for the msys the shared libraries begins by lib
and ends by the .dll.a
in the Windows.
For example: libboost_chrono-mgw74-mt-x32-1_72.dll.a
Which means i have to set these variables:
Boost_COMPILER=-mgw74
Boost_LIB_PREFIX=lib
Boost_ARCHITECTURE=-x32
CMAKE_FIND_LIBRARY_SUFFIXES=.dll.a
When the Boost_LIB_PREFIX
variable just resets because of that:
set(Boost_LIB_PREFIX "")
if ( (GHSMULTI AND Boost_USE_STATIC_LIBS) OR
(WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN) )
set(Boost_LIB_PREFIX "lib")
endif()
Edited by Brad King