mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 09:49:08 +08:00
39 lines
1.1 KiB
CMake
39 lines
1.1 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO pybind/pybind11
|
|
REF v2.2.3
|
|
SHA512 3a43b43f44ae4a6453fe3b875384acc868310177216938cb564536e6b73c56002743137e5f61cf4ecbd6c56e3b39476ebf06aea33d460581fc7d8ba7b2a22a67
|
|
HEAD_REF master
|
|
PATCHES
|
|
${CMAKE_CURRENT_LIST_DIR}/aliastemplates.patch
|
|
)
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYPATH ${PYTHON3} PATH)
|
|
set(ENV{PATH} "$ENV{PATH};${PYPATH}")
|
|
|
|
vcpkg_configure_cmake(
|
|
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()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/)
|
|
|
|
# copy license
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pybind11/copyright) |