2017-06-14 14:43:15 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO pybind/pybind11
|
2023-03-01 08:28:32 +08:00
|
|
|
REF "v${VERSION}"
|
2023-03-03 03:23:17 +08:00
|
|
|
SHA512 3894400f04cd08e2dbb14b3d696339f0364434f1d6f8bb057338ac88157ec7491b2df1e1e46ebd5abccdcd5775c5e9238de6404f0db87f64f5a1802db3a5b18c
|
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
|
|
|
|
2021-08-10 16:00:44 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-06-14 14:43:15 +08:00
|
|
|
OPTIONS
|
|
|
|
-DPYBIND11_TEST=OFF
|
2021-01-06 05:39:53 +08:00
|
|
|
-DPYBIND11_FINDPYTHON=ON
|
2017-06-14 14:43:15 +08:00
|
|
|
OPTIONS_RELEASE
|
|
|
|
-DPYTHON_IS_DEBUG=OFF
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DPYTHON_IS_DEBUG=ON
|
2017-03-27 14:09:39 +08:00
|
|
|
)
|
|
|
|
|
2021-08-10 16:00:44 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "share/cmake/pybind11")
|
2023-03-01 08:28:32 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-03-27 14:09:39 +08:00
|
|
|
|
2021-08-10 16:00:44 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/")
|
2017-03-27 14:09:39 +08:00
|
|
|
|
2022-03-15 01:25:04 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/pybind11/pybind11Tools.cmake"
|
|
|
|
[=[find_package(PythonLibsNew ${PYBIND11_PYTHON_VERSION} MODULE REQUIRED ${_pybind11_quiet})]=]
|
|
|
|
[=[find_package(PythonLibs ${PYBIND11_PYTHON_VERSION} MODULE REQUIRED ${_pybind11_quiet})]=]) # CMake's PythonLibs works better with vcpkg
|
|
|
|
|
2023-03-02 04:51:42 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|