[CPP] Conditional Linking and Excluding

For libraries/dependencies that Gradle doesn’t build, your two main options are to model them as prebuilt libraries: https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/native-binaries/prebuilt

or to add the arguments required to use them by hand for now (this makes the most sense for system libraries). i.e., You’d depend on the environment having the correct search paths and you’d say:

binaries.all {
   linker.args '-lopengl32'
}

WRT having separate platform specific implementations of things, you’d do something like this:

You basically selectively add new source sets based on the variant being built.

HTH