Since I found Gradle’s DSL to be comprehensible,
I decided to use it instead of CMake. I was able to build somefiles within Gradle but need help.
My project structure looks like this:
Noir/
build.gradle
settings.gradle
engine/
build.gradle
Noir/
headers
cpp
Noir.Graphics/
Noir.Sound/
editor/
Nothing yet
My Noir.Graphics component, does require certain libraries to be linked.
For windows I need “User32.dll”, “OpenGL32.dll” to be linked,
on linux I need X11 and MesaGLDev (I currently don’t now the libraries name).
My sound Component will need certain libraries too.
On the other hand, I’ll need to exclude certain files, which are used in conjunction with the PIMPL-Pattern (also known as Bridge-Pattern). These files are merely implementations for every platform.
How can this be achieved the Gradle DSL, since I am fairly new to it?
That’s my current gradle file:
apply plugin: 'cpp'
model{
components{
Noir(SharedLibraryBinarySpec)
Noir.Graphics(SharedLibraryBinarySpec)
Noir.Sound(SharedLibraryBinarySpec)
}
}
P.S.:
Who ever came up with the idea having two folders (headers, cpp), I admire it.