diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 6c773202133..e2d9f7dba39 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost Version: 1.65-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2, icu [windows] +Build-Depends: zlib, bzip2, icu [windows], python3 [windows] diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 212cd06b8c9..83206c098db 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -6,6 +6,9 @@ using msvc : 14.1 : cl.exe : echo ; +using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; +using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; + project user-config ; lib advapi32 ; lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 74db8a52463..8fd29a1f6eb 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -90,7 +90,6 @@ set(B2_OPTIONS --hash -q - --without-python threading=multi ) @@ -147,6 +146,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") --without-thread --without-iostreams --without-container + --without-python ) if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") find_path(PATH_TO_CL cl.exe) @@ -165,6 +165,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ESCAPE_QUOTES @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ESCAPE_QUOTES @ONLY) else() + # Find Python. Can't use find_package here, but we already know where everything is + file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") + set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) endif()