Reputation: 16735
I have a code which is branched by #define
directive, for example:
#ifdef USE_LIB_CRYPTO
#include <openssl/evp.h>
#else
#include <cryptopp/pwdbased.h>
#include <cryptopp/sha.h>
#endif
Depending on is defined USE_LIB_CRYPTO
or not I should add
LIBS += -lcrypto
or
LIBS += -lcryptopp
How can I do that? For example, this should be controlled by:
qmake ./ DEFINES+="USE_LIB_CRYPTO"
So I need to somehow check is define
passed to qmake and link to the library I need.
Upvotes: 1
Views: 648