Skip to content

Commit

Permalink
for metacall add the cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Dec 9, 2023
1 parent 9ec7eb1 commit 1193766
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,13 @@ if (GGML_USE_CPU_HBM)
find_library(memkind memkind REQUIRED)
endif()

add_library(libmetacall SHARED IMPORTED)
add_dependencies(libmetacall metacall)
set_property(
TARGET libmetacall
PROPERTY IMPORTED_LOCATION ${CMAKE_INSTALL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}metacall${CMAKE_SHARED_LIBRARY_SUFFIX}
)

add_library(ggml OBJECT
ggml.cpp
ggml.h
Expand All @@ -751,7 +758,7 @@ add_library(ggml OBJECT

target_include_directories(ggml PUBLIC "/usr/include/node/" . ${LLAMA_EXTRA_INCLUDES} )
target_compile_features(ggml PUBLIC c_std_23) # always bump
target_link_libraries(ggml PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS})
target_link_libraries(ggml PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS} libmetacall)
if (GGML_USE_CPU_HBM)
target_link_libraries(ggml PUBLIC memkind)
endif()
Expand Down

0 comments on commit 1193766

Please sign in to comment.