Hello all,

I've built Booost 1.66 on Windows with Visual Studio 2017 using the following invocation:

    .\b2
        link=shared
        runtime-link=shared
        threading=multi
        toolset=msvc
        variant=debug
        address-model=64
        install --prefix=C:/env/vs/amd64d

Then, the C:/env/vs/amd64d tree is filled like this:

  - lib/boost_timer-vc141-mt-gd-x64-1_66.lib (and so on)
  - include/boost-1_66/boost/{asio/assign,...}

I create a sample CMake project:

    cmake_minimum_required(VERSION 3.5)
    project(foo)
    find_package(Boost REQUIRED COMPONENTS timer)

I set CMAKE_PREFIX_PATH and run CMake

    set CMAKE_PREFIX_PATH=C:/env/vs/amd64d/
    cmake . -G "Visual Studio 15 2017 Win64"

    [...]
-- Detecting CXX compile features - done
CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:567 (message): Imported targets and dependency information not available for Boost version
  (all versions older than 1.33)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:3 (find_package)


CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1928 (message):
  Unable to find the requested Boost libraries.

Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!
See also "C:/Users/markand/Documents/test/CMakeFiles/CMakeOutput.log".

I can't understand what I am missing because it's not the first time I use boost on Windows though. I've tried set BOOST_ROOT to the same value as CMAKE_PREFIX_PATH with no results.

--
David Demelier
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to