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 e2292aaa17
commit 284e5b0275
No known key found for this signature in database
GPG Key ID: BF970631944C16B7

View 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