nixpkgs/pkgs/development/python-modules/soxr/cmake-nanobind.patch
2024-10-13 11:09:17 +02:00

17 lines
516 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb701aa..6cb4b02 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,11 @@ find_package(Python 3.9
REQUIRED COMPONENTS Interpreter Development.Module
OPTIONAL_COMPONENTS Development.SABIModule)
+execute_process(
+ COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE NB_DIR)
+list(APPEND CMAKE_PREFIX_PATH "${NB_DIR}")
+
find_package(nanobind CONFIG REQUIRED)
if (USE_SYSTEM_LIBSOXR)