I’m trying to compile a shared library, but it depends on a pre-build library which provides (on windows) .lib
files.
I’ve managed to point it to the header files, but can’t figure out how to point the linker to the lib file.
Here’s what I’ve got so far:
plugins {
id("cpp-library")
id("visual-studio")
}
library {
targetMachines.set(listOf(machines.linux.x86_64,
machines.windows.x86, machines.windows.x86_64,
machines.macOS.x86_64))
linkage.set(listOf(Linkage.SHARED))
privateHeaders.from(file("godot-cpp/godot_headers/"), file("godot-cpp/include"), file("godot-cpp/include/core"), file("godot-cpp/include/gen"))
}
I’ve found lots of docs, but most are for groovy, and other don’t specify the context to use them in. So I’ve seen code like linkVarriant {}
but linkDebug {}
is not recognized anywhere.
If I could define the pre-build library as a dependency, including it’s headers, and binaries and such, that’d be great. But all of the syntax I’ve seen for doing so doesn’t compile. Maybe it’s because I’m using kts files? Or maybe it’s for an older version of gradle? I don’t know.
I’m on Gradle 6.2.2
Any help would be greatly appreciated!