rasjani rasjani - 1 month ago 8
Linux Question

How to force qmake not to create symbolic links to target when TEMPLATE=lib?

I have a (partial) qmake project file like this:

TEMPLATE=lib
TARGET=whatever
SOURCES=whatever.cpp
HEADERS=whatever.h


This will - atleast by default - create a library and few symbolic links like this:

libwhatever.so -> libwhatever.so.0.1.0
libwhatever.so.0 -> libwhatever.so.0.1.0
libwhatever.so.0.1 -> libwhatever.so.0.1.0
libwhatever.so.0.1.0


libwhatever.so.0.1.0 is the actual library binary, rest of them are just symbolic links.

What i would like to archive is that no symbolic links are created at all or the order what be other way around so that libwhatever.so would be the actual binary and rest are the symbolic links.

Answer

If you override the QMAKE_LN_SHLIB variable with a no-op, it will not make the symbolic links.

QMAKE_LN_SHLIB       = :
Comments