Skip to content

Commit

Permalink
install ggml-cuda target if GGML_CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Nov 15, 2024
1 parent 438708d commit 3c49ef3
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions llama_cpp_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ set_target_properties(
CXX_STANDARD 11
)

set_target_properties(
ggml-cuda PROPERTIES
OUTPUT_NAME "llama_ggml_cuda"
INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${llama_SOURCE_DIR}/ggml/include>"
CXX_STANDARD 11
)
if(GGML_CUDA)
set_target_properties(
ggml-cuda PROPERTIES
OUTPUT_NAME "llama_ggml_cuda"
INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${llama_SOURCE_DIR}/ggml/include>"
CXX_STANDARD 11
)
endif()

# llama
set_target_properties(
Expand Down Expand Up @@ -90,17 +92,23 @@ install(
DESTINATION include
)

set(INSTALL_TARGETS
ggml
ggml-base
ggml-cpu
ggml-amx
build_info
common
llama
llava
)

if(GGML_CUDA)
list(APPEND INSTALL_TARGETS ggml-cuda)
endif()

install(
TARGETS
ggml
ggml-base
ggml-cpu
ggml-amx
ggml-cuda
build_info
common
llama
llava
TARGETS ${INSTALL_TARGETS}
EXPORT export_llama
LIBRARY DESTINATION lib
INCLUDES DESTINATION include
Expand Down

0 comments on commit 3c49ef3

Please sign in to comment.