From d014daaeaa204bcb2db70a2c929da0dc9fafc8b7 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 29 Jun 2022 10:57:59 -0700 Subject: [PATCH] always add raft::raft_nn_lib and raft::raft_distance_lib aliases so adding raft as a submodule provides the same library targets as using it as a package --- cpp/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 09645838b9..596cf8547d 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -286,9 +286,12 @@ if(RAFT_COMPILE_DIST_LIBRARY) endif() +if(TARGET raft_distance_lib AND (NOT TARGET raft::raft_distance_lib)) + add_library(raft::raft_distance_lib ALIAS raft_distance_lib) +endif() + target_link_libraries(raft_distance INTERFACE raft::raft - $ $ ) @@ -341,9 +344,12 @@ if(RAFT_COMPILE_NN_LIBRARY) INTERFACE "RAFT_NN_COMPILED") endif() +if(TARGET raft_nn_lib AND (NOT TARGET raft::raft_nn_lib)) + add_library(raft::raft_nn_lib ALIAS raft_nn_lib) +endif() + target_link_libraries(raft_nn INTERFACE raft::raft - $ $) ##############################################################################