How to create "library dependencies" to instead "includes defined by passing /I to compiler args" with visual studio?

Hi Expert,

Release note of gradle 1.11, there’s a note saying: “Includes defined by passing /I to compiler args are not included in your project configuration. Use library dependencies instead.”

Can anyone give a detail description of using library dependencies instead? For library dependency I only know from user guid like following:

sources {
    main {
        cpp {
              lib project:':Packages:BasicGroup:FoundationPackage',library:'main',linkage:'static'
            lib project:':Packages:BasicGroup:MathPackage',library:'main',linkage:'static'
        }
    }
}

How to create library dependency for includes “${global_basedir}/Extern/Intel/TBB/include” like:

cppCompiler.args "/I${global_basedir}/Extern/Intel/TBB/include"
cppCompiler.args "/I${global_basedir}/Extern/boost/include"

Also how to add static third-part lib files like qtcore.lib? Now I add them like:

linker.args "/LIBPATH:${global_qtdir}/lib"
linker.args "Qt5Network.lib"

but when run visul studio plugin, they will not add to linker vs’s linker settings

You can configure a ‘prebuilt library’ for each of these dependencies. In the future, we’ll provide better handling of ‘system’ libs (like the windows SDK), but for now everything outside of your project can be considered a ‘prebuilt’ library.

Take a look at the sample in ‘native-binaries/prebuilt’ for a better idea of how this is done.

Hi Daz,

is there a way we can use precompiled headers in windows build? I am struggling to add this functionality in build.gradle but did not succeed yet… I had posted another question but no one responded on it.

http://forums.gradle.org/gradle/topics/how-can-we-build-windows-cpp-code-which-is-using-precompiled-pch-files

Any help regarding this is greatly appreciated.

Thanks in advance.