Browse Source

dlib: add lapack, cuda options (#7201)

* Add missing options to dlib

* Update xmake.lua

---------

Co-authored-by: Saikari <[email protected]>
A2va 3 months ago
parent
commit
981de4f103
1 changed files with 10 additions and 0 deletions
  1. 10 0
      packages/d/dlib/xmake.lua

+ 10 - 0
packages/d/dlib/xmake.lua

@@ -18,6 +18,8 @@ package("dlib")
     add_configs("gif", {description = "Enable gif", default = false, type = "boolean"})
     add_configs("sqlite3", {description = "Enable sqlite3", default = false, type = "boolean"})
     add_configs("blas", {description = "Enable blas", default = false, type = "boolean"})
+    add_configs("lapack", {description = "Enable lapack", default = false, type = "boolean"})
+    add_configs("cuda", {description = "Enable cuda", default = false, type = "boolean"})
     add_configs("mkl", {description = "Enable mkl", default = false, type = "boolean"})
     add_configs("jxl", {description = "Enable jpeg xl", default = false, type = "boolean"})
     add_configs("ffmpeg", {description = "Enable ffmpeg", default = false, type = "boolean"})
@@ -47,6 +49,12 @@ package("dlib")
         if package:config("blas") then
             package:add("deps", "openblas")
         end
+        if package:config("lapack") then
+            package:add("deps", "lapack")
+        end
+        if package:config("cuda") then
+            package:add("deps", "cuda")
+        end
         if package:config("mkl") then
             package:add("deps", "mkl")
         end
@@ -84,6 +92,8 @@ package("dlib")
         table.insert(configs, "-DDLIB_GIF_SUPPORT=" .. (package:config("jpg") and "ON" or "OFF"))
         table.insert(configs, "-DDLIB_LINK_WITH_SQLITE3=" .. (package:config("sqlite3") and "ON" or "OFF"))
         table.insert(configs, "-DDLIB_USE_BLAS=" .. (package:config("blas") and "ON" or "OFF"))
+        table.insert(configs, "-DDLIB_USE_LAPACK=" .. (package:config("lapack") and "ON" or "OFF"))
+        table.insert(configs, "-DDLIB_USE_CUDA=" .. (package:config("cuda") and "ON" or "OFF"))
         table.insert(configs, "-DDLIB_USE_MKL_FFT=" .. (package:config("mkl") and "ON" or "OFF"))
         table.insert(configs, "-DDLIB_JXL_SUPPORT=" .. (package:config("jxl") and "ON" or "OFF"))
         table.insert(configs, "-DDLIB_USE_FFMPEG=" .. (package:config("ffmpeg") and "ON" or "OFF"))