apply plugin: 'objective-c'

model {
    components {
        main(NativeExecutableSpec)
    }
}

model {
    binaries {
        all {
            //on OS X we need different settings than on Linux or Windows
            if (targetPlatform.operatingSystem.macOsX) {
                linker.args "-framework", "Foundation"
            } else {
                objcCompiler.args "-I/usr/include/GNUstep", "-fconstant-string-class=NSConstantString", "-D_NATIVE_OBJC_EXCEPTIONS"
                linker.args "-lgnustep-base", "-lobjc"
            }
        }
    }
}
