[CMake] Cmake error when adding Boost library

Daniel Sáez danst.18 at gmail.com
Fri Feb 20 11:31:15 EST 2015


Hello,

I am trying to add Boost library to my project using the CMakeLists.txt in
the follwing way:

set(BOOST_INCLUDEDIR "C:/boost_1_57_0")set(BOOST_LIBRARYDIR
"C:/boost_1_57_0/stage/lib")

find_package(Boost 1.57.0 COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(test test.cpp)
target_link_libraries(test ${Boost_LIBRARIES})

However, I get the followng error: LINK : fatal error LNK1104: cannot open
file 'libboost_filesystem-vc120-mt-1_57.lib'

libboost_filesystem-vc120-mt-1_57.lib is located in the stage/lib folder,
so I don't know what is going on. I am compiling with Visual Studio 2013.

Any thoughts?

Thank you,

Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150220/f603bef1/attachment-0001.html>


More information about the CMake mailing list