Skip to content

Commit

Permalink
Link against targets instead of using directories
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Nov 6, 2024
1 parent b48a287 commit bcfaae0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,14 @@ add_library(kvikio::kvikio ALIAS kvikio)
target_include_directories(
kvikio
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CUDAToolkit_INCLUDE_DIRS}>"
"$<BUILD_INTERFACE:${cuFile_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:include>"
)

# 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} $<TARGET_NAME_IF_EXISTS:nvtx3::nvtx3-cpp>
$<COMPILE_ONLY:$<TARGET_NAME_IF_EXISTS:CUDA::cudart>> $<COMPILE_ONLY:$<TARGET_NAME_IF_EXISTS:cufile::cufile>>
PRIVATE $<TARGET_NAME_IF_EXISTS:CURL::libcurl>
)

Expand Down

0 comments on commit bcfaae0

Please sign in to comment.