]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
cmake : make it possible linking ggml as external lib (ggml/1003)
authorYuri Khrustalev <redacted>
Sat, 2 Nov 2024 09:09:12 +0000 (05:09 -0400)
committerGeorgi Gerganov <redacted>
Mon, 4 Nov 2024 08:33:11 +0000 (10:33 +0200)
ggml/src/CMakeLists.txt

index 82b81cf127000a5b3de52aa2e3352710102a1368..34b81bd7fdda1ea7b3cab69454b65f474d472b01 100644 (file)
@@ -1396,7 +1396,7 @@ if (EMSCRIPTEN)
 endif()
 
 target_compile_definitions(ggml PUBLIC    ${GGML_CDEF_PUBLIC})
-target_include_directories(ggml PUBLIC  ../include)
+target_include_directories(ggml PUBLIC    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include> $<INSTALL_INTERFACE:include>)
 target_include_directories(ggml PRIVATE . ${GGML_EXTRA_INCLUDES})
 target_link_directories   (ggml PRIVATE   ${GGML_EXTRA_LIBDIRS})
 target_compile_features   (ggml PRIVATE c_std_11) # don't bump