summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/projects/wdk/kmdf/msdsm/xmake.lua6
-rw-r--r--xmake/actions/build/kinds/object.lua6
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/projects/wdk/kmdf/msdsm/xmake.lua b/tests/projects/wdk/kmdf/msdsm/xmake.lua
index 65a861fc1..0e11a85e4 100644
--- a/tests/projects/wdk/kmdf/msdsm/xmake.lua
+++ b/tests/projects/wdk/kmdf/msdsm/xmake.lua
@@ -19,3 +19,9 @@ target("msdsm")
-- add file msdsm.mof and modify default wdk.mof.header for this file
add_files("msdsm.mof", {values = {wdk_mof_header = "msdsmwmi.h"}})
+ -- set precompiled header
+ set_pcheader("precomp.h")
+
+ -- add links
+ add_links("mpio")
+
diff --git a/xmake/actions/build/kinds/object.lua b/xmake/actions/build/kinds/object.lua
index 24a8a33b6..8e56cd6a2 100644
--- a/xmake/actions/build/kinds/object.lua
+++ b/xmake/actions/build/kinds/object.lua
@@ -297,9 +297,6 @@ function build(target, buildinfo)
ccache = find_ccache()
end
- -- build precompiled headers
- _build_pcheaderfiles(target, buildinfo)
-
-- build source batches with custom rules before building other sources
for sourcekind, sourcebatch in pairs(target:sourcebatches()) do
if sourcebatch.rulename then
@@ -307,6 +304,9 @@ function build(target, buildinfo)
end
end
+ -- build precompiled headers
+ _build_pcheaderfiles(target, buildinfo)
+
-- build source batches
for sourcekind, sourcebatch in pairs(target:sourcebatches()) do