|
@@ -55,6 +55,7 @@ package("opencv")
|
|
|
end
|
|
|
add_configs("blas", {description = "Set BLAS vendor.", default = nil, type = "string", values = {"mkl", "openblas"}})
|
|
|
add_configs("cuda", {description = "Enable CUDA support.", default = false, type = "boolean"})
|
|
|
+ add_configs("dynamic_parallel", {description = "Dynamically load parallel runtime (TBB etc.).", default = false, type = "boolean"})
|
|
|
|
|
|
if is_plat("macosx") then
|
|
|
add_frameworks("Foundation", "CoreFoundation", "CoreGraphics", "AppKit", "OpenCL")
|
|
@@ -109,6 +110,8 @@ package("opencv")
|
|
|
if package:config("cuda") then
|
|
|
table.insert(configs, "-DWITH_CUDA=ON")
|
|
|
end
|
|
|
+ table.insert(configs, "-DPARALLEL_ENABLE_PLUGINS=" .. (package:config("dynamic_parallel") and "ON" or "OFF"))
|
|
|
+ table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
|
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
|
|
|
if package:is_plat("windows") then
|
|
|
table.insert(configs, "-DBUILD_WITH_STATIC_CRT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
|