From 22f59a2191860c78506049829254669bde0f8bb5 Mon Sep 17 00:00:00 2001 From: toasterofbread Date: Sun, 24 Nov 2024 22:03:38 +0000 Subject: [PATCH] . --- library/build.gradle.kts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/library/build.gradle.kts b/library/build.gradle.kts index 6b50a43..8a5a37d 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -544,11 +544,20 @@ object Static { return emptyList() } - return process.inputStream.bufferedReader().use { reader -> - reader.readText().split(" ").mapNotNull { it.trim().takeIf { line -> - line.isNotBlank() && line != "-I/usr/include/x86_64-linux-gnu" && line != "-I/usr/include/aarch64-linux-gnu" - } } + var ret: List = + process.inputStream.bufferedReader().use { reader -> + reader.readText().split(" ").mapNotNull { it.trim().takeIf { line -> + line.isNotBlank() && line != "-I/usr/include/x86_64-linux-gnu" && line != "-I/usr/include/aarch64-linux-gnu" + } } + } + + if (Platform.getCurrent() == Platform.WINDOWS) { + ret = ret.map { + it.replace("/usr/include", "C:/cygwin/usr/include") + } } + + return ret } private fun findExecutable(name: String): String {