diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c1e6d9..212aaf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,10 +20,14 @@ FetchContent_Declare( FetchContent_Declare( pybind11 - URL https://github.com/pybind/pybind11/archive/7d538a42750c8580eeaac10e505840a3694b04c8.tar.gz) + URL https://github.com/pybind/pybind11/archive/daea1130b4245d23ce000266b1ed5a340d1a1e13.tar.gz) FetchContent_MakeAvailable(abseil-cpp pybind11) +if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE) + set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}") +endif() + set(TOP_LEVEL_DIR ${CMAKE_CURRENT_LIST_DIR}) include_directories(${TOP_LEVEL_DIR} ${PYTHON_INCLUDE_DIR} ${pybind11_INCLUDE_DIRS}) diff --git a/pybind11_abseil/CMakeLists.txt b/pybind11_abseil/CMakeLists.txt index c0f1236..3c61a5d 100644 --- a/pybind11_abseil/CMakeLists.txt +++ b/pybind11_abseil/CMakeLists.txt @@ -1,3 +1,7 @@ +if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE) + set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}") +endif() + add_subdirectory(cpp_capsule_tools) # absl_casters ============================================================ diff --git a/pybind11_abseil/cpp_capsule_tools/CMakeLists.txt b/pybind11_abseil/cpp_capsule_tools/CMakeLists.txt index 6ad81b9..5115ce4 100644 --- a/pybind11_abseil/cpp_capsule_tools/CMakeLists.txt +++ b/pybind11_abseil/cpp_capsule_tools/CMakeLists.txt @@ -1,3 +1,7 @@ +if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE) + set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}") +endif() + # void_ptr_from_capsule ======================================================== add_library(void_ptr_from_capsule STATIC void_ptr_from_capsule.cc) diff --git a/pybind11_abseil/tests/CMakeLists.txt b/pybind11_abseil/tests/CMakeLists.txt index 9ac8091..4dde411 100644 --- a/pybind11_abseil/tests/CMakeLists.txt +++ b/pybind11_abseil/tests/CMakeLists.txt @@ -1,5 +1,9 @@ # cpp_capsule_tools_testing ==================================================== +if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE) + set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}") +endif() + pybind11_add_module(cpp_capsule_tools_testing SHARED cpp_capsule_tools_testing.cc)