// tag::apply-plugin[]
apply plugin: 'objective-cpp'
// end::apply-plugin[]

// tag::executables[]
model {
    components {
        main(NativeExecutableSpec)
    }
}
// end::executables[]

// tag::all-binaries[]
model {
    binaries {
        all {
            //on macOS we need different linker settings than on Linux or Windows
            if (targetPlatform.operatingSystem.macOsX) {
                linker.args "-framework", "Foundation"
            } else {
                objcppCompiler.args "-I/usr/include/GNUstep", "-I/usr/local/include/objc", "-fconstant-string-class=NSConstantString", "-D_NATIVE_OBJC_EXCEPTIONS"
                linker.args "-lgnustep-base", "-lobjc"
            }
        }
    }
}
// end::all-binaries[]
