Fix build of samples/tetris for raspberrypi (#3813)

This commit is contained in:
Mike Sinkovsky
2020-02-03 10:17:09 +05:00
committed by GitHub
parent f818d7639f
commit efd6541a44
+3 -4
View File
@@ -6,12 +6,11 @@ plugins {
}
val hostOs = System.getProperty("os.name")
val isLinux = hostOs == "Linux"
val isWindows = hostOs.startsWith("Windows")
// If host platform is Linux and RaspberryPi target is activated.
// If RaspberryPi target is activated.
val isRaspberryPiBuild =
isLinux && project.findProperty("tetris.raspberrypi.build")?.toString()?.toBoolean() == true
project.findProperty("tetris.raspberrypi.build")?.toString()?.toBoolean() == true
// If host platform is Windows and x86 target is activated.
val isMingwX86Build =
@@ -65,7 +64,7 @@ kotlin {
presets["macosX64"] -> includeDirs("/opt/local/include/SDL2", "/usr/local/include/SDL2")
presets["linuxX64"] -> includeDirs("/usr/include/SDL2")
presets["mingwX64"], presets["mingwX86"] -> includeDirs(mingwPath.resolve("include/SDL2"))
presets["linuxArm32Hfp"] -> includeDirs(kotlinNativeDataPath.resolve("dependencies/target-sysroot-1-raspberrypi/usr/include/SDL2"))
presets["linuxArm32Hfp"] -> includeDirs(kotlinNativeDataPath.resolve("dependencies/target-sysroot-2-raspberrypi/usr/include/SDL2"))
}
}
}