diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index a633094a88..66f139c090 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -27,6 +27,16 @@ project( VERSION "${RAPIDS_VERSION}" LANGUAGES ${lang_list} ) + +# 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}) +endif() + set(CMAKE_INSTALL_MESSAGE LAZY) # Disable C++20 module scanning (not using modules, just C++20 features) @@ -1599,13 +1609,9 @@ if(NOT BUILD_CPU_ONLY) $> $> $<$:CUDA::nvtx3> - PRIVATE $ - $ - $ - CUDA::nvJitLink - CUDA::nvrtc - rtcx::rtcx - $ + PRIVATE $ $ + $ CUDA::nvJitLink CUDA::nvrtc rtcx::rtcx kvikio::kvikio + INTERFACE $ ) # ensure CUDA symbols aren't relocated to the middle of the debug build binaries diff --git a/cpp/cmake/thirdparty/get_kvikio.cmake b/cpp/cmake/thirdparty/get_kvikio.cmake index 50a320aa1e..e683659e66 100644 --- a/cpp/cmake/thirdparty/get_kvikio.cmake +++ b/cpp/cmake/thirdparty/get_kvikio.cmake @@ -15,15 +15,15 @@ function(find_and_configure_kvikio) # ---------------------------------------------------------------------------- # KvikIO provides the GPUDirect Storage (cuFile) and POSIX file I/O backends used by the CAGRA - # ACE disk-mode build. Shared cuVS builds consume it privately, while installed static cuVS - # targets retain it as a link-only dependency. At runtime the conda 'libkvikio' package provides - # both the shared library and its CMake package configuration. + # ACE disk-mode build. cuVS consumes it privately, while installed cuVS targets retain it as a + # link-only dependency. At runtime package managers provide both the shared library and its CMake + # package configuration. # ---------------------------------------------------------------------------- rapids_cpm_find( kvikio ${PKG_VERSION} GLOBAL_TARGETS kvikio::kvikio - BUILD_EXPORT_SET cuvs-static-exports - INSTALL_EXPORT_SET cuvs-static-exports + BUILD_EXPORT_SET cuvs-exports + INSTALL_EXPORT_SET cuvs-exports CPM_ARGS EXCLUDE_FROM_ALL TRUE GIT_REPOSITORY https://github.com/${PKG_FORK}/kvikio.git diff --git a/python/cuvs/CMakeLists.txt b/python/cuvs/CMakeLists.txt index bb08d217dd..23f8e58ca6 100644 --- a/python/cuvs/CMakeLists.txt +++ b/python/cuvs/CMakeLists.txt @@ -1,6 +1,6 @@ # ============================================================================= # cmake-format: off -# SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # cmake-format: on # ============================================================================= @@ -24,6 +24,9 @@ project( C CXX CUDA ) +# Find C++ libraries from RAPIDS wheels in site-packages. +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) + # ################################################################################################## # * Process User Options ------------------------------------------------------ diff --git a/python/libcuvs/CMakeLists.txt b/python/libcuvs/CMakeLists.txt index 858d5e1cda..8fe033e8e5 100644 --- a/python/libcuvs/CMakeLists.txt +++ b/python/libcuvs/CMakeLists.txt @@ -1,6 +1,6 @@ # ============================================================================= # cmake-format: off -# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # cmake-format: on # ============================================================================= @@ -18,6 +18,9 @@ project( LANGUAGES CXX CUDA ) +# Find C++ libraries from RAPIDS wheels in site-packages. +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) + option(USE_NCCL_RUNTIME_WHEEL "Use the NCCL wheel at runtime instead of the system library" OFF) # Check if cuVS is already available. If so, it is the user's responsibility to ensure that the