Я загрузил Boost в свой
Код: Выделить всё
D:\
Код: Выделить всё
.\b2 -j4 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/
Код: Выделить всё
cmake_minimum_required (VERSION 3.12)
# Enable Hot Reload for MSVC compilers if supported.
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$")
endif()
set(BOOST_ROOT D:/boost_1_82_0)
set(Boost_INCLUDE_DIR ${BOOST_ROOT})
set(Boost_DEBUG ON)
set(Boost_NO_SYSTEM_PATHS TRUE)
set(Boost_NO_BOOST_CMAKE TRUE)
# set(Boost_USE_STATIC_LIBS_ON)
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
project ("HelloCMake")
# Add source to this project's executable.
add_executable (HelloCMake "HelloCMake.cpp" "HelloCMake.h")
message(boost_libraries "${Boost_LIBRARIES}")
target_link_libraries(HelloCMake ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_CONTAINER_LIBRARY})
Код: Выделить всё
boost::asio
Код: Выделить всё
boost/json/src.hpp
Код: Выделить всё
Error LNK1104 cannot open file 'libboost_container-vc143-mt-gd-x64-1_82.lib'
I am new to cmake so I might be missing something obvious. Do you see any error with the cmake config? Thanks!
Источник: https://stackoverflow.com/questions/781 ... ough-cmake