2017-06-14 14:43:15 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO pybind/pybind11
|
2020-07-14 02:04:14 +08:00
|
|
|
REF 3b1dbebabc801c9cf6f0953a4c20b904d444f879 # v2.5.0
|
|
|
|
SHA512 1a75d29447dbba96eebf8ecdebad1be0dd5327c32f5122b0ece9d9ec22eae4feacd0efb3a5070b3a135a892b1682c7215b0c529b179493694df932945a379f4c
|
2017-06-14 14:43:15 +08:00
|
|
|
HEAD_REF master
|
2017-03-27 14:09:39 +08:00
|
|
|
)
|
2017-06-14 14:43:15 +08:00
|
|
|
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYPATH ${PYTHON3} PATH)
|
2020-07-14 02:04:14 +08:00
|
|
|
vcpkg_add_to_path("${PYPATH}")
|
2017-03-27 14:09:39 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2017-06-14 14:43:15 +08:00
|
|
|
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
|
2017-03-27 14:09:39 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2020-09-12 03:48:28 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/pybind11)
|
2017-03-27 14:09:39 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/)
|
|
|
|
|
|
|
|
# copy license
|
2020-07-14 02:04:14 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|