Files
llama.cpp/examples/run/CMakeLists.txt
T

16 lines
655 B
CMake
Raw Normal View History

2024-11-25 16:56:24 -05:00
set(TARGET llama-run)
2025-01-18 14:42:31 +00:00
add_executable(${TARGET} run.cpp linenoise.cpp/linenoise.cpp)
2025-04-07 13:35:19 +02:00
# TODO: avoid copying this code block from common/CMakeLists.txt
set(LLAMA_RUN_EXTRA_LIBS "")
if (LLAMA_CURL)
find_package(CURL REQUIRED)
target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
include_directories(${CURL_INCLUDE_DIRS})
find_library(CURL_LIBRARY curl REQUIRED)
set(LLAMA_RUN_EXTRA_LIBS ${LLAMA_RUN_EXTRA_LIBS} ${CURL_LIBRARY})
endif ()
2024-11-25 16:56:24 -05:00
install(TARGETS ${TARGET} RUNTIME)
2025-04-07 13:35:19 +02:00
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} ${LLAMA_RUN_EXTRA_LIBS})
2024-11-29 21:54:58 +01:00
target_compile_features(${TARGET} PRIVATE cxx_std_17)