Search for all libs in a directory



  • i have a folder called "libs". This folder looks like:
    @
    libs
    |-A
    |- first.a
    |- first.so
    |- second.a
    |- second.so
    |-B
    |- third.a
    |- third.so
    |- fourth.a
    |- fourth.so
    @

    Is there a possibility to tell the .pro file to take all libs in the "libs"-folder?
    May i do something like this:
    @
    LIBS += -L /mypath/libs/* -l*
    @

    Thanks!



  • Got it:
    wrote a make function makro and added it to the .pro file
    Write this in your .pro file:
    @
    #without this variable qmake generats "" in the makefile e.g.: ..patsubst\ ./...
    MY_VARIABLE = patsubst
    LIBS += $($$MY_VARIABLE %.so,%,$(subst /path/to/libsfolder/lib, -l, $(wildcard /path/to/libsfolder/*.so)))
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.