I’m trying to add the boost library to my repositories as a prebuilt library and don’t want to make one prebuilt library for each of the boost sub-libs that come with a static lib. Since the boost sub-libs that come with a static lib know how to link theirs libs (via pre-processor #pragmas) my idea was to just add LIBPATH pointing to these static libs to the linker args like this:
What’s your reason for not wanting to create separate prebuilt library instances? The usual way to do this would be to iterate over the libraries on disk and configure a prebuilt library for each.
Because normally (when not using Gradle but Visual Studio) I don’t have to. All I need to do is tell the compiler where the boost headers are, and the linker where the libs are. Not each lib individually, just the directory where all lib files are stored. Then when I include e.g. boost/thread.hpp, the linker will automatically be told to link the corresponding lib file. I thought I could replicate that with Gradle.
That sounds interesting. Can you point me to an example? I’m new to Gradle and don’t know the usual tricks.
I don’t have an example on hand, but if you know a bit of Groovy you can iterate over the directories or files, and configure a prebuilt library for each with the normal syntax.