diff options
author | wzy <32936898+Freed-Wu@users.noreply.github.com> | 2023-07-19 15:01:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 10:01:11 +0300 |
commit | b1f429095328a34556c0e9a7a2fefced3db3368c (patch) | |
tree | ecb3a5fd6d15e609b58011f27ff0e1e8b123c92b /CMakeLists.txt | |
parent | d01bccde9f759b24449fdaa16306b406a50eb367 (diff) |
cmake : install targets (#2256)
fix #2252
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 25 |
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 |