Team Ai
Apppublic

KBaba7/llama.cpp

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
llama-config.cmake55 linesDownload Raw Back to build
1set(LLAMA_VERSION      0.0.4667)2set(LLAMA_BUILD_COMMIT d2fe216f)3set(LLAMA_BUILD_NUMBER 4667)4set(LLAMA_SHARED_LIB   ON)5 6 7####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######8####### Any changes to this file will be overwritten by the next CMake run ####9####### The input file was llama-config.cmake.in                            ########10 11get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)12 13macro(set_and_check _var _file)14  set(${_var} "${_file}")15  if(NOT EXISTS "${_file}")16    message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")17  endif()18endmacro()19 20macro(check_required_components _NAME)21  foreach(comp ${${_NAME}_FIND_COMPONENTS})22    if(NOT ${_NAME}_${comp}_FOUND)23      if(${_NAME}_FIND_REQUIRED_${comp})24        set(${_NAME}_FOUND FALSE)25      endif()26    endif()27  endforeach()28endmacro()29 30####################################################################################31 32set_and_check(LLAMA_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")33set_and_check(LLAMA_LIB_DIR     "${PACKAGE_PREFIX_DIR}/lib")34set_and_check(LLAMA_BIN_DIR     "${PACKAGE_PREFIX_DIR}/bin")35 36find_package(ggml REQUIRED HINTS ${LLAMA_LIB_DIR}/cmake)37 38find_library(llama_LIBRARY llama39    REQUIRED40    HINTS ${LLAMA_LIB_DIR}41    NO_CMAKE_FIND_ROOT_PATH42)43 44add_library(llama UNKNOWN IMPORTED)45set_target_properties(llama46    PROPERTIES47        INTERFACE_INCLUDE_DIRECTORIES "${LLAMA_INCLUDE_DIR}"48        INTERFACE_LINK_LIBRARIES "ggml::ggml;ggml::ggml-base;"49        IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"50        IMPORTED_LOCATION "${llama_LIBRARY}"51        INTERFACE_COMPILE_FEATURES c_std_9052        POSITION_INDEPENDENT_CODE ON)53 54check_required_components(Llama)55