I'm adopting cmake script for a windows build, and faced with an issue which was not occured under *nix
set(BOOST_ROOT, "C:/dev/tools/boost_1_60_0")
include_directories(${INCLUDE_DIRECTORIES} ${BOOST_ROOT} include)
It doesn't work - during the compilation , vc can't find boost headers.
include_directories(${INCLUDE_DIRECTORIES} "C:/dev/tools/boost_1_60_0" include)
this works well.
any ideas why it happens?
just for sure, for this configuration pre-compiled libraries are not required so then I don't perform find_package, just using a headers
if it's not a typo, the "," is not needed in the set directive :
set(BOOST_ROOT "C:/dev/tools/boost_1_60_0")
this should work as expected.
Why not FindBoost()
?
find_package(Boost 1.60 REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.