dub
                                
                                
                                
                                    dub copied to clipboard
                            
                            
                            
                        Support for library search paths
These are linker specific settings:
    "lflags-posix": [ "-L/a/path" ],
    "lflags-windows": [ "/LIBPATH:A:/Path" ],
The specificity could be abstracted away by Dub. Specified paths have few chances to be the same, so the support would be of seldom use today, but #1448 can boost the need for this feature.
I'm not sure what exactly you are suggesting ?
Abstracting away lflags between Windows and POSIX is near impossible, as there is no proper mechanism for sharing DLLs on Windows (most libs just ship the DLLs they need).
On POSIX, dub supports pkg-config, which seems like the best way to go.
Okay, I've had to make things cross platform between Mac, Linux and Windows, and I understand this issue better now.
What I ended up going with, to avoid hard-coding too much platform (and machine) specific information into the dub.json is requiring that the library path is in LIB.
I can see a case where you want to abstract that, e.g. d2sqlite distribute the binary (https://github.com/biozic/d2sqlite3/tree/master/lib).
Related: I had the problem of dub generate visuald not propagating /LIBPATH defined in "lflags" to VS. I discovered that link libraries can actually be supplied including their path. So, instead of
"libs": [ "mylib" ]
you can do
"libs": [ "$PACKAGE_DIR/mylib" ]
which solves that problem.
I would suggest also that dub itself supports a command line switch to add library search paths.
It's common that a necessary 3rd party binary library be installed not via the normal package manager of the system, and so people put them in whatever location they like. It doesn't make sense for these kinds of things to have to go into the dub file.
I believe all Posix linkers use the same argument format, but I don't know about windows.