diff options
| author | ruki <[email protected]> | 2020-12-24 23:23:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-24 23:23:10 +0800 |
| commit | 621e3706b229c39cfe4c94bfa9417405cde883fb (patch) | |
| tree | b6fcac4ae1120ed64af8dcaff032cda6d73393bb /xmake/modules/package/tools/cmake.lua | |
| parent | 70865b36f34647bda2bdd218b428bcca0cecc9da (diff) | |
fix vs_runtime values
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 3835e0d3b..a126fe514 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -197,10 +197,19 @@ function _get_configs_for_windows(package, configs, opt) end end local vs_runtime = package:config("vs_runtime") + if vs_runtime == "MT" then + table.insert(configs, "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded") + elseif vs_runtime == "MTd" then + table.insert(configs, "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug") + elseif vs_runtime == "MD" then + table.insert(configs, "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL") + elseif vs_runtime == "MDd" then + table.insert(configs, "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL") + end if vs_runtime then - table.insert(configs, '-DCMAKE_CXX_FLAGS_DEBUG="/' .. vs_runtime .. 'd"') + table.insert(configs, '-DCMAKE_CXX_FLAGS_DEBUG="/' .. vs_runtime .. '"') table.insert(configs, '-DCMAKE_CXX_FLAGS_RELEASE="/' .. vs_runtime .. '"') - table.insert(configs, '-DCMAKE_C_FLAGS_DEBUG="/' .. vs_runtime .. 'd"') + table.insert(configs, '-DCMAKE_C_FLAGS_DEBUG="/' .. vs_runtime .. '"') table.insert(configs, '-DCMAKE_C_FLAGS_RELEASE="/' .. vs_runtime .. '"') end _get_configs_for_generic(package, configs, opt) |
