mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 14:59:27 +00:00
feat: FindPython by default (#5553)
* feat: FindPython by default Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Update tools/pybind11Config.cmake.in --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -81,7 +81,7 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
|
||||
else()
|
||||
set(PYBIND11_MASTER_PROJECT OFF)
|
||||
set(pybind11_system SYSTEM)
|
||||
set(_pybind11_findpython_default OFF)
|
||||
set(_pybind11_findpython_default COMPAT)
|
||||
endif()
|
||||
|
||||
# Options
|
||||
@@ -114,7 +114,9 @@ cmake_dependent_option(
|
||||
"Install pybind11 headers in Python include directory instead of default installation prefix"
|
||||
OFF "PYBIND11_INSTALL" OFF)
|
||||
|
||||
option(PYBIND11_FINDPYTHON "Force new FindPython" ${_pybind11_findpython_default})
|
||||
set(PYBIND11_FINDPYTHON
|
||||
${_pybind11_findpython_default}
|
||||
CACHE STRING "Force new FindPython - NEW, OLD, COMPAT")
|
||||
|
||||
# Allow PYTHON_EXECUTABLE if in FINDPYTHON mode and building pybind11's tests
|
||||
# (makes transition easier while we support both modes).
|
||||
|
||||
Reference in New Issue
Block a user