summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2018-04-23 22:45:44 +0800
committerruki <[email protected]>2018-04-23 10:34:29 +0800
commitef0cf64971eaa9a0b4331f7fa1518bf79dbf6178 (patch)
tree351e53c3750a0b2e7d192fd47cd3e8e264ea91e6 /xmake/modules
parentd1de6e6006a786f46016d30db4a8f90037039143 (diff)
add qt support for msvc and mingw
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/core/tools/cl.lua4
-rw-r--r--xmake/modules/detect/sdks/find_qt.lua9
2 files changed, 11 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index c0f4b369c..8b5ffcbd6 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -192,8 +192,8 @@ function nf_language(self, stdname)
-- the stdc++ maps
local cxxmaps =
{
- cxx11 = "-std=c++11"
- , gnuxx11 = "-std=c++11"
+ cxx11 = "-std:c++11"
+ , gnuxx11 = "-std:c++11"
, cxx14 = "-std:c++14"
, gnuxx14 = "-std:c++14"
, cxx17 = "-std:c++17"
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua
index 1becbdfc5..28a517444 100644
--- a/xmake/modules/detect/sdks/find_qt.lua
+++ b/xmake/modules/detect/sdks/find_qt.lua
@@ -41,6 +41,15 @@ function _find_sdkdir(sdkdir, sdkver)
targetdir = is_arch("x86_64") and "gcc_64" or "gcc_32"
elseif is_plat("macosx") then
targetdir = is_arch("x86_64") and "clang_64" or "clang_32"
+ elseif is_plat("windows") then
+ local vs = config.get("vs")
+ if vs then
+ targetdir = is_arch("x64") and "msvc" .. vs .. "_64" or "msvc" .. vs .. "_32"
+ else
+ targetdir = is_arch("x64") and "msvc*_64" or "msvc*_32"
+ end
+ elseif is_plat("mingw") then
+ targetdir = is_arch("x64") and "mingw*_64" or "mingw*_32"
elseif is_plat("android") then
targetdir = "android_*" -- TODO android_armv7 and ..?
end