File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,11 +35,25 @@ endif()
3535# ────────────────────────────────────────────
3636# Dependencies
3737# ────────────────────────────────────────────
38- # nanobind (requires Python to be located first; pybind11 used to do this internally)
39- find_package (Python COMPONENTS Interpreter Development.Module REQUIRED )
38+ # nanobind (requires Python to be located first; pybind11 used to do this
39+ # internally)
40+ find_package (
41+ Python
42+ COMPONENTS Interpreter Development.Module
43+ REQUIRED )
44+ # Nanobind ships its CMake config inside site-packages/nanobind/cmake, so
45+ # find_package() can't discover it unless we set it. (scikit-build-core does
46+ # this as well)
47+ if (NOT nanobind_ROOT)
48+ execute_process (
49+ COMMAND "${Python_EXECUTABLE} " -m nanobind --cmake_dir
50+ OUTPUT_STRIP_TRAILING_WHITESPACE
51+ OUTPUT_VARIABLE nanobind_ROOT )
52+ endif ()
4053find_package (nanobind CONFIG REQUIRED )
41- # Build nanobind's core support library up front so the object libraries below (which include
42- # nanobind headers via the umbrella) compile against its include dirs + Python headers + flags.
54+ # Build nanobind's core support library up front so the object libraries below
55+ # (which include nanobind headers via the umbrella) compile against its include
56+ # dirs + Python headers + flags.
4357nanobind_build_library (nanobind-static )
4458
4559# DuckDB
You can’t perform that action at this time.
0 commit comments