From 79b129cc47859d3bc7439e40577f667b700e673a Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Mon, 12 Jun 2023 14:08:36 +0200 Subject: use targetos instead of custom opt field --- xmake/modules/package/tools/cmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 09499bde1..003bc0acd 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -512,7 +512,7 @@ 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 = opt.system_name or "Linux" + envs.CMAKE_SYSTEM_NAME = package:targetos() or "Linux" else if package:config("pic") ~= false then table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON") -- cgit v1.3.1