diff options
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index debe44bd2..248368e77 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -288,13 +288,7 @@ function _get_cmake_version() return cmake_version end -function _get_cmake_system_processor(package, opt) - opt = opt or {} - local configs_str = opt._configs_str - if configs_str and configs_str:find("CMAKE_SYSTEM_PROCESSOR", 1, true) then - return - end - +function _get_cmake_system_processor(package) -- on Windows, CMAKE_SYSTEM_PROCESSOR comes from PROCESSOR_ARCHITECTURE -- on other systems it's the output of uname -m if package:is_plat("windows") then @@ -459,7 +453,7 @@ function _get_configs_for_appleos(package, configs, opt) end elseif package:is_cross() then envs.CMAKE_SYSTEM_NAME = "Darwin" - envs.CMAKE_SYSTEM_PROCESSOR = _get_cmake_system_processor(package, opt) + envs.CMAKE_SYSTEM_PROCESSOR = _get_cmake_system_processor(package) end envs.CMAKE_OSX_ARCHITECTURES = package:arch() envs.CMAKE_FIND_ROOT_PATH_MODE_PACKAGE = "BOTH" @@ -491,7 +485,7 @@ function _get_configs_for_mingw(package, configs, opt) envs.CMAKE_EXE_LINKER_FLAGS = _get_ldflags(package, opt) envs.CMAKE_SHARED_LINKER_FLAGS = _get_shflags(package, opt) envs.CMAKE_SYSTEM_NAME = "Windows" - envs.CMAKE_SYSTEM_PROCESSOR = _get_cmake_system_processor(package, opt) + envs.CMAKE_SYSTEM_PROCESSOR = _get_cmake_system_processor(package) -- avoid find and add system include/library path -- @see https://github.com/xmake-io/xmake/issues/2037 envs.CMAKE_FIND_ROOT_PATH = sdkdir |
