Cannot find boost libs using gcc toolset for boost 1.67 and CMake 3.11
Hi,
When using the GCC toolset in boost 1.67, the compiled libs cannot be found. This is because the file naming scheme now includes 'x32' and 'x64'. When I remove these from the compiled libs, CMake finds the boost libs.
Now, when using the MSVC toolset, CMake 3.11 finds the libs with the 'x32' and 'x64' portion in their name.
This can be tested by compiling boost with 'bootstrap gcc' and then 'b2'. In CMake perform this:
set (Boost_USE_STATIC_LIBS ON)
#set (BOOST_ROOT ${CMAKE_SOURCE_DIR}/boost_1_67_0) #if not installed in typical boost paths, tell CMake where to find
find_package (Boost 1.67.0 EXACT COMPONENTS date_time system REQUIRED)
if (Boost_FOUND)
include_directories (${Boost_INCLUDE_DIRS})
target_link_libraries (${PROJECT_NAME} ${Boost_LIBRARIES})
endif ()
Again, for MSVC, CMake has no issue with 'x32' and 'x64' but for GCC toolset it has problems.
https://www.boost.org/doc/libs/1_67_0/more/getting_started/windows.html (more details on building boost)