Browse Source

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

Yuri Khrustalev 1 năm trước cách đây
mục cha
commit
284e5b0275
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      ggml/src/CMakeLists.txt

+ 1 - 1
ggml/src/CMakeLists.txt

@@ -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