qmake prepends -L/usr/lib and/or -L/usr/local/lib onto the front of
the link path. This will cause problems on systems where one version
of the library is installed on the system (/usr/lib), while another
version (often a newer version installed under $HOME) was used to
compile the openscad library. Even the OPENCGALDIR and OPENCSGDIR
commands do not override the -L/usr/lib flag.
It seems like it would take a lot of work to fix this. I am no expert
but it appears that it would require reworking all of the .pri and
.pro files to use QMAKE_LIBDIR instead of LIBS+=, because QMAKE_LIBDIR
allows you to prepend things to all of the linkflags, where as LIBS
seems to come after QMAKE_LIBDIR. But this might break other things.
There are some workarounds.
alternative 1. become root and uninstall the old versions of the
libraries. install newer versions from source
alternative 2. hack the makefile generated by qmake and re-order the
library paths to work properly on your system
For most people this probably won't be a problem. But if someone is
trying to compile the source on a machine, they can get unexplained
and strange errors.
Please try the branch named 'qmake'.
Set the environment variable OPENSCAD_LIBRARIES to point to the install prefix of 3rd party libraries.
This works for me on Mac and doesn't screw up my Linux build, but it needs some testing on other systems, as well as Windows. This should theoretically work on Windows as well, but ymmw.