The documentation states:
48.5. Working with shared libraries
The C++ plugin provides an installMain task, which creates a development install of the executable, along with the shared libraries it
requires. This allows you to run the executable without needing to install the shared libraries in their final locations.
However, if I have a cpp-exe project which has an external dependency on a cpp-lib project (using an Ivy repository) I find that I can’t run the created executables from neither installMain or compileMain.
This appears to be the case because there is no .so file included in the build directory. It is however uploaded correctly to the Ivy repository so my expectation is that it should work.
I’ve looked at the examples and I can’t work out what I am missing.
apply plugin: ‘java’
apply plugin:‘application’
apply plugin: ‘cpp-exe’
group=‘org.x’
version(‘1.0.0’)
dependencies {
compile(‘org.x:a:1.0.+’)
}
cpp {
sourceSets {
main {
dependency group: “org.x”, name: “a”, version: “1.0.0”
}
}
} … (and an uploadArchives and repositories declaration, implemented for the Java plugi)
I have tried disabling the java/application plugins but it doesn’t matter, so there does not appear to be any interference from that.