From 0c904e6f55aa9037ce19267692abcfb4f4aa6921 Mon Sep 17 00:00:00 2001 From: giomba Date: Mon, 19 Aug 2019 13:52:49 +0200 Subject: [PATCH] other improvements for library packaging actually not permanent --- lib/CNS.h | 9 ++++++--- lib/cnsparser.pro | 11 +---------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/lib/CNS.h b/lib/CNS.h index 782d551..45908a8 100644 --- a/lib/CNS.h +++ b/lib/CNS.h @@ -16,8 +16,11 @@ #include #include -// QT -- What to export -//#define CNS Q_DECL_EXPORT CNS +#ifdef CNSPARSER_LIBRARY + #define CNSPARSER_EXPORT Q_DECL_EXPORT +#else + #define CNSPARSER_EXPORT Q_DECL_IMPORT +#endif // PCSCLITE // -------------------------------------------------------------------- @@ -46,7 +49,7 @@ enum Sex { M }; -class CNS { +class CNSPARSER_EXPORT CNS { private: QString nome; QString cognome; diff --git a/lib/cnsparser.pro b/lib/cnsparser.pro index 03943a6..ffbec13 100644 --- a/lib/cnsparser.pro +++ b/lib/cnsparser.pro @@ -8,16 +8,7 @@ QT += core TARGET = cnsparser TEMPLATE = lib -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 +DEFINES += QT_DEPRECATED_WARNINGS CNSPARSER_LIBRARY CONFIG += c++11 link_pkgconfig PKGCONFIG += libpcsclite