summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2024-02-08 14:50:18 +0100
committerArthur LAURENT <[email protected]>2024-02-08 14:51:53 +0100
commit14a186c9a2ee9df85621361af610fcf4dc96befe (patch)
treefc6c80e293fbbe91cc79699688b17aa42c15ea03
parent93545500fa6f1ac8bb9980d3837ca5b6847b0ebb (diff)
fix CMake moduleonly support
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 30ba57d66..2fd0eb57a 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -326,7 +326,7 @@ end
-- add target: headeronly
function _add_target_moduleonly(cmakelists, target)
- cmakelists:print("add_library(%s INTERFACE)", target:name())
+ cmakelists:print("add_custom_target(%s)", target:name())
end
-- add target dependencies
@@ -1012,6 +1012,7 @@ function _add_target(cmakelists, target, outputdir)
return
elseif targetkind == 'moduleonly' then
_add_target_moduleonly(cmakelists, target)
+ return
else
raise("unknown target kind %s", target:kind())
end