summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/cmake.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 493b30d80..56be71442 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -1209,7 +1209,7 @@ function configure(package, configs, opt)
"CMAKE_SHARED_LINKER_FLAGS")
local shrink = false
table.remove_if(argv, function (idx, value)
- local k, v = value:match("-D(.*)=(.*)")
+ local k, v = value:match("%-D(.*)=(.*)")
if k and v and long_options:has(k) and #v > 128 then
table.insert(cmake_argv, ("set(%s \"%s\")"):format(k, tostring(v)))
shrink = true