Native window decorations: do not try to build native library (on Windows) if no C++ compiler is available

This commit is contained in:
Karl Tauber
2021-03-06 15:18:23 +01:00
parent 8734b062dc
commit 4372052ef0

View File

@@ -30,6 +30,8 @@ library {
sharedLibrary { sharedLibrary {
compileTasks.configureEach { compileTasks.configureEach {
onlyIf { isBuildable }
doFirst { doFirst {
println( "Used Tool Chain:" ) println( "Used Tool Chain:" )
println( " - ${toolChain.get()}" ) println( " - ${toolChain.get()}" )
@@ -62,6 +64,8 @@ library {
} }
linkTask.configure { linkTask.configure {
onlyIf { isBuildable }
val nativesDir = project( ":flatlaf-core" ).projectDir.resolve( "src/main/resources/com/formdev/flatlaf/natives" ) val nativesDir = project( ":flatlaf-core" ).projectDir.resolve( "src/main/resources/com/formdev/flatlaf/natives" )
val libraryName = "flatlaf-windows-x86_64.dll" val libraryName = "flatlaf-windows-x86_64.dll"
@@ -85,6 +89,10 @@ library {
} }
} }
} }
tasks.named( "jar" ) {
onlyIf { isBuildable }
}
} }
} }
} }