summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 290e40d1e..52ff4cd58 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -381,6 +381,7 @@ function _add_target_link_options(cmakelists, target)
local ldflags = _get_configs_from_target(target, "ldflags")
local shflags = _get_configs_from_target(target, "shflags")
if #ldflags > 0 or #shflags > 0 then
+ local cmake_minver = _get_cmake_minver()
if cmake_minver:ge("3.13.0") then
cmakelists:print("target_link_options(%s PRIVATE", target:name())
else