diff options
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 75912612a..90b2530ee 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -462,11 +462,11 @@ function _get_configs_for_windows(package, configs, opt) if package:has_tool("cc", "clang", "clang_cl") then envs.CMAKE_C_COMPILER = _translate_bin_path(package:build_getenv("cc")) -- @see https://github.com/xmake-io/xmake-repo/issues/7662 - envs.CMAKE_C_FLAGS = table.join(package:build_getenv("cflags") or {}, package:build_getenv("cxflags")) + envs.CMAKE_C_FLAGS = _get_cflags(package, {cross = true}) end if package:has_tool("cxx", "clang", "clang_cl") then envs.CMAKE_CXX_COMPILER = _translate_bin_path(package:build_getenv("cxx")) - envs.CMAKE_CXX_FLAGS = table.join(package:build_getenv("cxxflags") or {}, package:build_getenv("cxflags")) + envs.CMAKE_CXX_FLAGS = _get_cxxflags(package, {cross = true}) end -- we maybe need patch `cmake_policy(SET CMP0091 NEW)` to enable this argument for some packages |
