MinGW compilation fix

This commit is contained in:
Jakub Melka
2021-12-18 17:00:04 +01:00
parent f814a85df8
commit c75b8d677c
9 changed files with 41 additions and 5 deletions

View File

@ -15,7 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#ifndef PDFGLOBAL_H
#define PDFGLOBAL_H
@ -32,6 +31,27 @@
# define PDF4QTLIBSHARED_EXPORT Q_DECL_IMPORT
#endif
// Compiler detection
#if defined(_MSC_VER)
#define PDF4QT_COMPILER_MSVC 1
#endif
#if defined(__clang__)
#define PDF4QT_COMPILER_CLANG 1
#endif
#if defined(__MINGW32__) || defined(__MINGW64__)
#define PDF4QT_COMPILER_MINGW 1
#endif
#if defined(__GNUC__)
#define PDF4QT_COMPILER_GCC 1
#endif
#if defined(Q_OS_WIN) && (defined(PDF4QT_COMPILER_MSVC) || defined(PDF4QT_COMPILER_CLANG))
#define PDF4QT_USE_PRAGMA_LIB 1
#endif
namespace pdf
{