cmake : allow repeated find_package calls for llama (#29228)

This commit is contained in:
miyan
2026-09-22 13:58:42 +02:00
committed by GitHub
parent 7ab4ee7baa
commit a60f9aead0
2 changed files with 14 additions and 9 deletions
+3
View File
@@ -5,6 +5,9 @@ set(TARGET llama-simple-cmake-pkg)
find_package(Llama REQUIRED)
# Check that repeated package discovery does not redefine imported targets.
find_package(Llama REQUIRED)
add_executable(${TARGET} ${CMAKE_CURRENT_LIST_DIR}/../simple/simple.cpp)
install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE llama ggml::all ${CMAKE_THREAD_LIBS_INIT})