Search code examples
c++qtlibrariesqmake

qmake : Build library without the symlinks and 'lib' prefix


I require a very simple mechanism in my application, where my project is built as a shared library '.so' or '.dll', but what I want is:

ExampleAppOne.so

I get:

libExampleAppOne.so -> libExampleAppOne.so.1.0.0
libExampleAppOne.so.1 -> libExampleAppOne.so.1.0.0
libExampleAppOne.so.1.0 -> libExampleAppOne.so.1.0.0

I don't even want the 'lib' prefix. In the .pro file, all I can do is change the INSTALLS variable (that is because my third requirement IS that the library be built in a specific directory).

Also, I have a fourth, related requirement: When I ask QLibrary to load the library, I want it to specifically search for a library in a very specific path and a library that matches the EXACT name given to it. No 'lib' prefix matching, no 'version string' searching, no looking into LD_LIBRARY_PATH...

Any help is appreciated.

Regards, rohan


Solution

  • add the following to you .pro file

    # disables the lib prefix
    CONFIG += no_plugin_name_prefix
    # disable symlinks & versioning
    CONFIG += plugin