From: Borislav Stanimirov Date: Mon, 8 Jul 2024 14:08:55 +0000 (+0300) Subject: cmake : allow external ggml X-Git-Tag: upstream/1.7.4~576 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=16d72504fe3f49da8dc245f9f76ab609dbc3b54c;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp cmake : allow external ggml --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bcb0347..cb17def7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,10 @@ whisper_option_depr(WARNING WHISPER_SYCL_F16 GGML_SYCL_F16) # build the library # -add_subdirectory(ggml) +if (NOT TARGET ggml) + add_subdirectory(ggml) + # ... otherwise assume ggml is added by a parent CMakeLists.txt +endif() add_subdirectory(src) #