diff --git a/CMakeLists.txt b/CMakeLists.txt index f62f9df51e40..91445e5813d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -513,8 +513,9 @@ option(CIRCT_BINDINGS_PYTHON_ENABLED "Enables CIRCT Python bindings." OFF) if(CIRCT_BINDINGS_PYTHON_ENABLED) message(STATUS "CIRCT Python bindings are enabled.") - set(MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES 0) - mlir_detect_pybind11_install() + set(MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES 1) + include(MLIRDetectPythonEnv) + mlir_configure_python_dev_packages() # Prime the search like mlir_configure_python_dev_modules find_package(Python3 3.8 COMPONENTS Interpreter Development) find_package(Python3 3.8 COMPONENTS Interpreter Development.Module)