diff --git a/examples/pybind11-project/CMakeLists.txt b/examples/pybind11-project/CMakeLists.txt index 0ca625b..683963f 100644 --- a/examples/pybind11-project/CMakeLists.txt +++ b/examples/pybind11-project/CMakeLists.txt @@ -12,7 +12,7 @@ if (DEFINED PY_BUILD_CMAKE_PACKAGE_VERSION) endif() # Find the Python interpreter and the development files -if (CMAKE_CROSSCOMPILING) +if (CMAKE_CROSSCOMPILING AND NOT (APPLE AND ENV{CIBUILDWHEEL} STREQUAL "1")) find_package(Python3 REQUIRED COMPONENTS Development.Module) else() find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) diff --git a/examples/pybind11-project/cmake/QueryPythonForPybind11.cmake b/examples/pybind11-project/cmake/QueryPythonForPybind11.cmake index b600d0c..f4af2e4 100644 --- a/examples/pybind11-project/cmake/QueryPythonForPybind11.cmake +++ b/examples/pybind11-project/cmake/QueryPythonForPybind11.cmake @@ -8,7 +8,7 @@ mark_as_advanced(USE_GLOBAL_PYBIND11) function(find_pybind11_python_first) # Find Python - if (CMAKE_CROSSCOMPILING) + if (CMAKE_CROSSCOMPILING AND NOT (APPLE AND ENV{CIBUILDWHEEL} STREQUAL "1")) find_package(Python3 REQUIRED COMPONENTS Development.Module) else() find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) diff --git a/test-packages/namespace-project-a/CMakeLists.txt b/test-packages/namespace-project-a/CMakeLists.txt index 0ca625b..683963f 100644 --- a/test-packages/namespace-project-a/CMakeLists.txt +++ b/test-packages/namespace-project-a/CMakeLists.txt @@ -12,7 +12,7 @@ if (DEFINED PY_BUILD_CMAKE_PACKAGE_VERSION) endif() # Find the Python interpreter and the development files -if (CMAKE_CROSSCOMPILING) +if (CMAKE_CROSSCOMPILING AND NOT (APPLE AND ENV{CIBUILDWHEEL} STREQUAL "1")) find_package(Python3 REQUIRED COMPONENTS Development.Module) else() find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) diff --git a/test-packages/namespace-project-a/cmake/QueryPythonForPybind11.cmake b/test-packages/namespace-project-a/cmake/QueryPythonForPybind11.cmake index b600d0c..f4af2e4 100644 --- a/test-packages/namespace-project-a/cmake/QueryPythonForPybind11.cmake +++ b/test-packages/namespace-project-a/cmake/QueryPythonForPybind11.cmake @@ -8,7 +8,7 @@ mark_as_advanced(USE_GLOBAL_PYBIND11) function(find_pybind11_python_first) # Find Python - if (CMAKE_CROSSCOMPILING) + if (CMAKE_CROSSCOMPILING AND NOT (APPLE AND ENV{CIBUILDWHEEL} STREQUAL "1")) find_package(Python3 REQUIRED COMPONENTS Development.Module) else() find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)