summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2022-06-10 17:25:44 +0200
committerArthur LAURENT <[email protected]>2022-06-10 18:46:53 +0200
commit4331ffcbbb032102f16b0a7516c690b64516e824 (patch)
treee436d46e93df69e103bb694f76a0c946d104e897
parent400d06537eb5271264a7d7e47b7433da4e854d42 (diff)
Apply PR suggestions
-rw-r--r--tests/projects/qt/quickplugin/xmake.lua4
-rw-r--r--xmake/rules/qt/env/xmake.lua4
-rw-r--r--xmake/rules/qt/qmltyperegistrar/xmake.lua8
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/projects/qt/quickplugin/xmake.lua b/tests/projects/qt/quickplugin/xmake.lua
index 8b20240e0..afd4cc59b 100644
--- a/tests/projects/qt/quickplugin/xmake.lua
+++ b/tests/projects/qt/quickplugin/xmake.lua
@@ -5,8 +5,4 @@ target("demo")
add_headerfiles("src/*.h")
add_files("src/*.cpp")
- if is_plat("windows") then
- add_cxxflags("/permissive-")
- end
-
set_values("qt.qmlplugin.import_name", "My.Plugin") \ No newline at end of file
diff --git a/xmake/rules/qt/env/xmake.lua b/xmake/rules/qt/env/xmake.lua
index 4cc39794c..47bc0760c 100644
--- a/xmake/rules/qt/env/xmake.lua
+++ b/xmake/rules/qt/env/xmake.lua
@@ -34,6 +34,10 @@ rule("qt.env")
target:add("runenvs", "PATH", qt.bindir)
target:set("runenv", "QML2_IMPORT_PATH", qt.qmldir)
target:set("runenv", "QML_IMPORT_TRACE", "1")
+
+ if not target:is_plat("mingw") then
+ target:add("cxxflags", "/permissive-")
+ end
elseif target:is_plat("msys", "cygwin") then
raise("please run `xmake f -p mingw --mingw=/mingw64` to support Qt/Mingw64 on Msys!")
end
diff --git a/xmake/rules/qt/qmltyperegistrar/xmake.lua b/xmake/rules/qt/qmltyperegistrar/xmake.lua
index 3ffd2d76a..38a04bbc4 100644
--- a/xmake/rules/qt/qmltyperegistrar/xmake.lua
+++ b/xmake/rules/qt/qmltyperegistrar/xmake.lua
@@ -48,7 +48,7 @@ rule("qt.qmltyperegistrar")
target:set("targetdir", targetdir)
-- add qmldir
- local qmldir = target:values("qt.qmlplugin.qmldir")
+ local qmldir = target:values("qt.qmlplugin.qmldirfile")
if qmldir then
target:add("installfiles", qmldir)
end
@@ -97,7 +97,7 @@ rule("qt.qmltyperegistrar")
"--import-name=" .. importname,
"--major-version=" .. majorversion,
"--minor-version=" .. minorversion,
- "-o", path(sourcefile)
+ "-o", sourcefile
}
-- gen sourcefile
@@ -111,14 +111,14 @@ rule("qt.qmltyperegistrar")
-- compile sourcefile
batchcmds:show_progress(opt.progress, "${color.build.object}compile.qt.qmltyperegistrar %s", path.filename(sourcefile))
batchcmds:compile(sourcefile, objectfile)
-
+
batchcmds:add_depfiles(sourcefile)
batchcmds:set_depmtime(os.mtime(objectfile))
batchcmds:set_depcache(target:dependfile(objectfile))
end)
after_build(function(target)
- local qmldir = target:values("qml.plugin.qmldir")
+ local qmldir = target:values("qml.plugin.qmldirfile")
if qmldir then
os.cp(qmldir, target:targetdir())
end