File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ option(WHISPER_ALL_WARNINGS           "whisper: enable all compiler warnings"
6262option (WHISPER_ALL_WARNINGS_3RD_PARTY "whisper: enable all compiler warnings in 3rd party libs"  OFF )
6363
6464# build 
65- option (WHISPER_FATAL_WARNINGS "whisper: enable -Werror flag"  OFF )
65+ option (WHISPER_FATAL_WARNINGS  "whisper: enable -Werror flag"                OFF )
66+ option (WHISPER_USE_SYSTEM_GGML "whisper: use system-installed GGML library"  OFF )
6667
6768# sanitizers 
6869option (WHISPER_SANITIZE_THREAD    "whisper: enable thread sanitizer"     OFF )
@@ -121,7 +122,15 @@ whisper_option_depr(WARNING     WHISPER_SYCL_F16            GGML_SYCL_F16)
121122# 
122123
123124if  (NOT  TARGET  ggml)
124-     add_subdirectory (ggml)
125+     if  (WHISPER_USE_SYSTEM_GGML)
126+         find_package (ggml REQUIRED)
127+         if  (NOT  ggml_FOUND)
128+             message (FATAL_ERROR "System-installed GGML library not found." )
129+         endif ()
130+         add_library (ggml ALIAS ggml::ggml)
131+     else ()
132+         add_subdirectory (ggml)
133+     endif ()
125134    # ... otherwise assume ggml is added by a parent CMakeLists.txt 
126135endif ()
127136add_subdirectory (src)
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments