diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-06-13 23:43:15 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-06-13 23:43:15 -0700 |
| commit | 50fca8f92acd0e0a6ae082e67d58c59e01a51ad5 (patch) | |
| tree | b431a37e402242ffa81c431d914bdaeb5eed1bdf | |
| parent | 77a45ad175bafaeb3c72e1349acef0dc3a797307 (diff) | |
| download | vcpkg-50fca8f92acd0e0a6ae082e67d58c59e01a51ad5.tar.gz vcpkg-50fca8f92acd0e0a6ae082e67d58c59e01a51ad5.zip | |
[pybind11] Build against python3 library inside vcpkg, add find_acquire_program(PYTHON3)
| -rw-r--r-- | ports/pybind11/CONTROL | 5 | ||||
| -rw-r--r-- | ports/pybind11/portfile.cmake | 31 |
2 files changed, 26 insertions, 10 deletions
diff --git a/ports/pybind11/CONTROL b/ports/pybind11/CONTROL index a51fd173c..e5ca37eb4 100644 --- a/ports/pybind11/CONTROL +++ b/ports/pybind11/CONTROL @@ -1,3 +1,4 @@ Source: pybind11 -Version: 2.1.0 -Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code.
\ No newline at end of file +Version: 2.1.0-1 +Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. +Build-Depends: python3
\ No newline at end of file diff --git a/ports/pybind11/portfile.cmake b/ports/pybind11/portfile.cmake index 933efbd19..668edb5d9 100644 --- a/ports/pybind11/portfile.cmake +++ b/ports/pybind11/portfile.cmake @@ -1,17 +1,32 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pybind11-2.1.0) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/pybind/pybind11/archive/v2.1.0.tar.gz" - FILENAME "pybind11-2.1.0.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pybind/pybind11 + REF v2.1.0 SHA512 2f74dcd2b82d8e41da7db36351284fe04511038bec66bdde820da9c0fce92f6d2c5aeb2e48264058a91a775a1a6a99bc757d26ebf001de3df4183d700d46efa1 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_find_acquire_program(PYTHON3) + +get_filename_component(PYPATH ${PYTHON3} PATH) +set(ENV{PATH} "$ENV{PATH};${PYPATH}") vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPYBIND11_TEST=OFF + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPYBIND11_TEST=OFF + -DPYTHONLIBS_FOUND=ON + -DPYTHON_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include + -DPYTHON_MODULE_EXTENSION=.dll + OPTIONS_RELEASE + -DPYTHON_IS_DEBUG=OFF + -DPYTHON_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/python36.lib + OPTIONS_DEBUG + -DPYTHON_IS_DEBUG=ON + -DPYTHON_LIBRARIES=${CURRENT_INSTALLED_DIR}/debug/lib/python36_d.lib ) vcpkg_install_cmake() |
