From 1493ee084b213d76c3caec638850be8f15f8deb2 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 8 Sep 2026 17:25:15 -0500 Subject: [PATCH 1/3] Discover CMake packages installed by wheels --- cpp/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 885fa54..3972f3b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -23,12 +23,21 @@ include(rapids-cpm) include(rapids-cuda) include(rapids-export) include(rapids-find) +include(${rapids-cmake-dir}/cython-core/find_prefix_paths.cmake) project( NVForest VERSION "${RAPIDS_VERSION}" LANGUAGES CXX) +# Find CMake packages provided by installed wheels. +find_package(Python COMPONENTS Interpreter) +if(Python_FOUND) + rapids_cython_find_prefix_paths("${Python_EXECUTABLE}" wheel_prefix_paths) + set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) + list(PREPEND CMAKE_PREFIX_PATH ${wheel_prefix_paths}) +endif() + # Write the version header rapids_cmake_write_version_file(include/nvforest/version_config.hpp) From edc29fb7a7dfc920a2693ac6e0565b8e61280361 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 8 Sep 2026 17:32:45 -0500 Subject: [PATCH 2/3] Defer wheel prefix helper until Python is found --- cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3972f3b..fe17816 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -23,7 +23,6 @@ include(rapids-cpm) include(rapids-cuda) include(rapids-export) include(rapids-find) -include(${rapids-cmake-dir}/cython-core/find_prefix_paths.cmake) project( NVForest @@ -33,6 +32,7 @@ project( # Find CMake packages provided by installed wheels. find_package(Python COMPONENTS Interpreter) if(Python_FOUND) + include(${rapids-cmake-dir}/cython-core/find_prefix_paths.cmake) rapids_cython_find_prefix_paths("${Python_EXECUTABLE}" wheel_prefix_paths) set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) list(PREPEND CMAKE_PREFIX_PATH ${wheel_prefix_paths}) From 7b46a72fabfce4b803bee5db49da26beb4a03e6b Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 9 Sep 2026 14:42:54 -0500 Subject: [PATCH 3/3] Fix wheel dependency discovery in Python builds --- python/libnvforest/CMakeLists.txt | 3 +++ python/nvforest/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/python/libnvforest/CMakeLists.txt b/python/libnvforest/CMakeLists.txt index 7d4ff70..430ebfa 100644 --- a/python/libnvforest/CMakeLists.txt +++ b/python/libnvforest/CMakeLists.txt @@ -17,6 +17,9 @@ project( VERSION "${RAPIDS_VERSION}" LANGUAGES CXX CUDA) +# Find C++ libraries from RAPIDS wheels in site-packages. +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) + # Check if nvForest is already available. If so, it is the user's responsibility to ensure that the CMake package is # also available at build time of the Python nvForest package. find_package(nvforest "${RAPIDS_VERSION}") diff --git a/python/nvforest/CMakeLists.txt b/python/nvforest/CMakeLists.txt index 5ebd872..258aa55 100644 --- a/python/nvforest/CMakeLists.txt +++ b/python/nvforest/CMakeLists.txt @@ -20,6 +20,9 @@ project( VERSION "${RAPIDS_VERSION}" LANGUAGES ${language_list}) +# Find C++ libraries from RAPIDS wheels in site-packages. +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) + # ###################################################################################################################### # * User Options -------------------------------------------------------------- option(USE_LIBNVFOREST_WHEEL "Use libnvforest wheel to provide some dependencies" OFF)