From 130db9684c15211b3f7a1c1820dc2dc044c1cc29 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 6 Nov 2024 14:13:43 -0500 Subject: [PATCH] Fix exporting of include directories (#540) The CUDA and cufile include directories should not be exported as absolute paths when installing, only in the build tree. Add a `$` generator expression. Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/kvikio/pull/540 --- cpp/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3a42e44401..8e3302f991 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -125,15 +125,19 @@ add_library(kvikio::kvikio ALIAS kvikio) target_include_directories( kvikio - PUBLIC "$" "${CUDAToolkit_INCLUDE_DIRS}" - "${cuFile_INCLUDE_DIRS}" + PUBLIC "$" INTERFACE "$" ) # Notice, we do not link to cuda or cufile since KvikIO opens them manually using `dlopen()`. target_link_libraries( kvikio - PUBLIC Threads::Threads BS::thread_pool ${CMAKE_DL_LIBS} $ + PUBLIC Threads::Threads + BS::thread_pool + ${CMAKE_DL_LIBS} + $ + $> + $> PRIVATE $ )