find_package() doesn't detect boost on Windows Cmake

后端 未结 4 557
广开言路
广开言路 2020-12-23 15:21

I\'m using a windows system. I want to use the Boost library using CMake. I\'ve installed boost on C:\\boost_1_55_0\\ Here is my CMakeLists.txt file

set(Boos         


        
4条回答
  •  旧巷少年郎
    2020-12-23 16:04

    On Windows 7 x64 I have Boost 1.58 installed to C:\SDKs\boost_1_58_0. In order to allow cMake to find all of the appropriate files, I had to add the following three system variables:

        BOOST_INCLUDEDIR    C:\SDKs\boost_1_58_0\
        BOOST_LIBRARYDIR    C:\SDKs\boost_1_58_0\lib64-msvc-12.0
        BOOST_ROOT          C:\SDKs\boost_1_58_0\boost
    

提交回复
热议问题