Include pre-built libraries in native binary projects

(Tyler Rigward) #1

How can I reference the pre-builts project libraries in a task (as described in the 1.11 release notes in section “Include pre-built libraries in native binary projects”)?

(Steven Walters) #2

I’m trying to implement this as well and found the gradle example at which worked for me fairly well.

(Tyler Rigward) #3

Thank you very much - worked like a charm.


You can do one of the two variants:

executables {

main {} } sources.main.cpp.lib library: ‘boost’, linkage: ‘api’ sources.main.cpp.lib library: ‘util’, linkage: ‘static’ task buildExecutables {

dependsOn binaries.withType(ExecutableBinary) }


executables {

main {

cpp {



lib library: ‘boost’, linkage: ‘api’


} }