diff --git a/hic/src/CMakeLists.txt b/hic/src/CMakeLists.txt index 42803534b..d152af868 100644 --- a/hic/src/CMakeLists.txt +++ b/hic/src/CMakeLists.txt @@ -27,6 +27,14 @@ ecbuild_add_library( TARGET hic $ ) +ecbuild_add_library( TARGET hicsparse + TYPE INTERFACE + PUBLIC_INCLUDES + $ + $ + $ +) + install( FILES ${PROJECT_BINARY_DIR}/src/hic/hic_config.h DESTINATION include/hic ) install( FILES hic/hic.h DESTINATION include/hic ) install( FILES hic/hic_runtime.h DESTINATION include/hic ) @@ -39,8 +47,8 @@ install( FILES hic/hic_dummy/hicsparse_dummy.h DESTINATION include/hi if( HAVE_CUDA ) target_link_libraries( hic INTERFACE CUDA::cudart ) - target_link_libraries( hic INTERFACE CUDA::cusparse ) + target_link_libraries( hicsparse INTERFACE hic CUDA::cusparse ) elseif( HAVE_HIP ) target_link_libraries( hic INTERFACE hip::host ) - target_link_libraries( hic INTERFACE roc::hipsparse ) + target_link_libraries( hicsparse INTERFACE hic roc::hipsparse ) endif() diff --git a/hic/tests/CMakeLists.txt b/hic/tests/CMakeLists.txt index 4a2717e8f..2d327f032 100644 --- a/hic/tests/CMakeLists.txt +++ b/hic/tests/CMakeLists.txt @@ -20,7 +20,7 @@ if( HAVE_HIP OR HAVE_CUDA ) ecbuild_add_test( TARGET hic_test_hicsparse SOURCES test_hicsparse.cc - LIBS hic + LIBS hicsparse ) endif()