diff options
| author | Jérôme Leclercq <[email protected]> | 2024-04-01 17:57:25 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-01 17:57:25 +0200 |
| commit | 81a2155257aa0cba6a560cbc3b0f226dba5c6280 (patch) | |
| tree | cec9c4cc6887083052de13e4b7253c325ce78efd /xmake/modules/package/tools/cmake.lua | |
| parent | 9719e92e74b377df823a5f78e7d6ad8086653b36 (diff) | |
Update cmake.lua
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 4155817c7..2a0a4d006 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -427,16 +427,9 @@ function _get_configs_for_android(package, configs, opt) table.insert(configs, "-DANDROID_NATIVE_API_LEVEL=" .. ndk_sdkver) end -- https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_STL_TYPE.html - local supported_runtimes = { - "gnustl_static", "gnustl_shared", - "c++_static", "c++_shared", - "stlport_static", "stlport_shared" - } - for _, runtime in ipairs(supported_runtimes) do - if package:has_runtime(runtime) then - table.insert(configs, "-DCMAKE_ANDROID_STL_TYPE=" .. runtime) - break - end + local runtime = package:runtimes() + if runtime then + table.insert(configs, "-DCMAKE_ANDROID_STL_TYPE=" .. runtime) end if is_host("windows") and opt.cmake_generator ~= "Ninja" then local make = path.join(ndk, "prebuilt", "windows-x86_64", "bin", "make.exe") |
