cmake : make it possible linking ggml as external lib (ggml/1003)

This commit is contained in:
Yuri Khrustalev 2024-11-02 05:09:12 -04:00 committed by Georgi Gerganov
parent b1c06c09b0
commit 28496ac55e

View File

@ -1391,7 +1391,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