apply plugin: 'cpp'

model {
    flavors {
        english
        french
    }
    components {
        hello(NativeLibrarySpec) {
            binaries.all {
                if (flavor == flavors.french) {
                    cppCompiler.define "FRENCH"
                }
            }
        }
    }
}

model {
    binaries {
        withType(SharedLibraryBinarySpec) {
            cppCompiler.define "DLL_EXPORT"
        }
    }
    components {
        main(NativeExecutableSpec) {
            binaries.all {
                lib library: 'hello'
            }
        }
    }
}
