diff options
| author | ruki <[email protected]> | 2023-06-19 22:40:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-06-19 22:40:20 +0800 |
| commit | fb841455af09c821fcf68f1652c99fd496492841 (patch) | |
| tree | 6ac356aa06161431b14f66e00237acd016e9315f | |
| parent | 4ae1b14bbc7979f2ac4989da0fe29e37547d9d41 (diff) | |
improve system name for tools.cmake
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index f56467ac7..d8b4a7a6f 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -511,7 +511,11 @@ function _get_configs_for_cross(package, configs, opt) -- we need not set it as cross compilation if we just pass toolchain -- https://github.com/xmake-io/xmake/issues/2170 if not package:is_plat(os.subhost()) then - envs.CMAKE_SYSTEM_NAME = package:targetos() or "Linux" + local system_name = package:targetos() or "Linux" + if system_name == "linux" then + system_name = "Linux" + end + envs.CMAKE_SYSTEM_NAME = system_name else if package:config("pic") ~= false then table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON") |
