Vcpkg: Can't find Boost python despite building Boost with python feature package enabled

Created on 21 Oct 2017  路  1Comment  路  Source: microsoft/vcpkg

I am on Windows 10, VS 2017. I installed boost with vcpkg install boost[locale-icu,regex-icu,python] --featurepackage

In my minimal downstream CMakeLists.txt

``````
cmake_minimum_required(VERSION 3.5)

project(Example)

find_package( Boost COMPONENTS python REQUIRED )

set(PROJECT_SRCS ${PROJECT_SOURCE_DIR}/main.cpp)

add_executable(${PROJECT_NAME} ${PROJECT_SRCS})

target_link_libraries(${PROJECT_NAME} Boost::python)
``````

main.cpp can be anything, cmake configuration failed with the below error message

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

Boost version: 1.65.1

Boost include path: C:/vcpkg/installed/x64-windows/include

Could not find the following Boost libraries:

      boost_python

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
C:/vcpkg/scripts/buildsystems/vcpkg.cmake:159 (_find_package)
CMakeLists.txt:12 (find_package)

-- Configuring incomplete, errors occurred!
``````

But the fact is I have a boost_python3-vc141-mt-1_65_1 lying inside C:\vcpkg\installed\x64-windows\bin but for reason it is not able to discover it.

port-bug

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

F0I0l0I0P picture F0I0l0I0P  路  3Comments

angelmixu picture angelmixu  路  3Comments

oahzuw picture oahzuw  路  3Comments

pakdel picture pakdel  路  3Comments

PhilLab picture PhilLab  路  3Comments