aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorwzy <32936898+Freed-Wu@users.noreply.github.com>2023-07-19 15:01:11 +0800
committerGitHub <noreply@github.com>2023-07-19 10:01:11 +0300
commitb1f429095328a34556c0e9a7a2fefced3db3368c (patch)
treeecb3a5fd6d15e609b58011f27ff0e1e8b123c92b /CMakeLists.txt
parentd01bccde9f759b24449fdaa16306b406a50eb367 (diff)
cmake : install targets (#2256)
fix #2252
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9381da..abc9681 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -512,6 +512,7 @@ if (BUILD_SHARED_LIBS)
set_target_properties(ggml PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_library(ggml_shared SHARED $<TARGET_OBJECTS:ggml>)
target_link_libraries(ggml_shared PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS})
+ install(TARGETS ggml_shared LIBRARY)
endif()
add_library(llama
@@ -533,8 +534,32 @@ if (BUILD_SHARED_LIBS)
if (LLAMA_METAL)
set_target_properties(llama PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/ggml-metal.metal")
endif()
+ install(TARGETS llama LIBRARY)
endif()
+include(GNUInstallDirs)
+install(
+ FILES convert.py
+ PERMISSIONS
+ OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ
+ WORLD_EXECUTE
+ DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(
+ FILES convert-lora-to-ggml.py
+ PERMISSIONS
+ OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ
+ WORLD_EXECUTE
+ DESTINATION ${CMAKE_INSTALL_BINDIR})
#
# programs, examples and tests