2024-06-26 17:33:02 +02:00
|
|
|
set(LLAMA_VERSION @LLAMA_INSTALL_VERSION@)
|
2023-09-14 19:04:40 +02:00
|
|
|
set(LLAMA_BUILD_COMMIT @LLAMA_BUILD_COMMIT@)
|
|
|
|
set(LLAMA_BUILD_NUMBER @LLAMA_BUILD_NUMBER@)
|
2024-06-26 17:33:02 +02:00
|
|
|
set(LLAMA_SHARED_LIB @BUILD_SHARED_LIBS@)
|
|
|
|
|
2023-09-14 19:04:40 +02:00
|
|
|
@PACKAGE_INIT@
|
|
|
|
|
|
|
|
set_and_check(LLAMA_INCLUDE_DIR "@PACKAGE_LLAMA_INCLUDE_INSTALL_DIR@")
|
2024-06-26 17:33:02 +02:00
|
|
|
set_and_check(LLAMA_LIB_DIR "@PACKAGE_LLAMA_LIB_INSTALL_DIR@")
|
|
|
|
set_and_check(LLAMA_BIN_DIR "@PACKAGE_LLAMA_BIN_INSTALL_DIR@")
|
2023-09-14 19:04:40 +02:00
|
|
|
|
2025-01-26 17:07:48 +01:00
|
|
|
find_package(ggml REQUIRED)
|
2024-07-13 18:12:39 +02:00
|
|
|
|
2023-09-14 19:04:40 +02:00
|
|
|
find_library(llama_LIBRARY llama
|
|
|
|
REQUIRED
|
2024-11-18 16:23:58 +01:00
|
|
|
HINTS ${LLAMA_LIB_DIR}
|
|
|
|
NO_CMAKE_FIND_ROOT_PATH
|
|
|
|
)
|
2023-09-14 19:04:40 +02:00
|
|
|
|
|
|
|
add_library(llama UNKNOWN IMPORTED)
|
|
|
|
set_target_properties(llama
|
|
|
|
PROPERTIES
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${LLAMA_INCLUDE_DIR}"
|
2025-01-26 17:07:48 +01:00
|
|
|
INTERFACE_LINK_LIBRARIES "ggml::ggml;ggml::ggml-base;"
|
2023-09-14 19:04:40 +02:00
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
|
|
|
IMPORTED_LOCATION "${llama_LIBRARY}"
|
2025-01-26 17:07:48 +01:00
|
|
|
INTERFACE_COMPILE_FEATURES c_std_90
|
|
|
|
POSITION_INDEPENDENT_CODE ON)
|
2023-09-14 19:04:40 +02:00
|
|
|
|
|
|
|
check_required_components(Llama)
|