diff options
| author | ruki <[email protected]> | 2025-02-20 00:54:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-02-20 00:54:57 +0800 |
| commit | 0a438f8721806ae97b97c592a5dbc036c3f7ae4d (patch) | |
| tree | 51f25bf98b693de987f7ff90e4f67e6db721af8f | |
| parent | a292b01553d065d1ef7099fffb1cfd394ca12d2c (diff) | |
improve to find kotlinc-native suffix
| -rw-r--r-- | xmake/toolchains/kotlin-native/xmake.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/toolchains/kotlin-native/xmake.lua b/xmake/toolchains/kotlin-native/xmake.lua index 0260e3ac4..3d239d71b 100644 --- a/xmake/toolchains/kotlin-native/xmake.lua +++ b/xmake/toolchains/kotlin-native/xmake.lua @@ -23,10 +23,11 @@ toolchain("kotlin-native") set_homepage("https://kotlinlang.org") set_description("The Kotlin Programming Language Compiler. ") - set_toolset("kc", "$(env KC)", "kotlinc-native") - set_toolset("kcld", "$(env KC)", "kotlinc-native") - set_toolset("kcsh", "$(env KC)", "kotlinc-native") - set_toolset("kcar", "$(env KC)", "kotlinc-native") + local suffix = is_host("windows") and ".bat" or "" + set_toolset("kc", "$(env KC)", "kotlinc-native" .. suffix) + set_toolset("kcld", "$(env KC)", "kotlinc-native" .. suffix) + set_toolset("kcsh", "$(env KC)", "kotlinc-native" .. suffix) + set_toolset("kcar", "$(env KC)", "kotlinc-native" .. suffix) on_check(function (toolchain) import("lib.detect.find_tool") |
