mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-02-11 01:00:35 +01:00
MinGW compilation fix
This commit is contained in:
parent
f814a85df8
commit
c75b8d677c
@ -34,8 +34,10 @@
|
|||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <Icm.h>
|
#include <Icm.h>
|
||||||
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
#pragma comment(lib, "Mscms")
|
#pragma comment(lib, "Mscms")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
@ -34,15 +34,18 @@
|
|||||||
#include <QPainterPath>
|
#include <QPainterPath>
|
||||||
#include <QDataStream>
|
#include <QDataStream>
|
||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include "Windows.h"
|
#include "Windows.h"
|
||||||
|
|
||||||
#pragma comment(lib, "Gdi32")
|
|
||||||
#pragma comment(lib, "User32")
|
|
||||||
#elif defined(Q_OS_UNIX)
|
#elif defined(Q_OS_UNIX)
|
||||||
#include <fontconfig/fontconfig.h>
|
#include <fontconfig/fontconfig.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
|
#pragma comment(lib, "Gdi32")
|
||||||
|
#pragma comment(lib, "User32")
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace pdf
|
namespace pdf
|
||||||
{
|
{
|
||||||
/// Storage class for system fonts
|
/// Storage class for system fonts
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
// You should have received a copy of the GNU Lesser General Public License
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
#ifndef PDFGLOBAL_H
|
#ifndef PDFGLOBAL_H
|
||||||
#define PDFGLOBAL_H
|
#define PDFGLOBAL_H
|
||||||
|
|
||||||
@ -32,6 +31,27 @@
|
|||||||
# define PDF4QTLIBSHARED_EXPORT Q_DECL_IMPORT
|
# define PDF4QTLIBSHARED_EXPORT Q_DECL_IMPORT
|
||||||
#endif
|
#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
|
namespace pdf
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -2009,8 +2009,10 @@ void PDFCertificateStore::createDirectoryForDefaultUserCertificatesStore()
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <wincrypt.h>
|
#include <wincrypt.h>
|
||||||
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
#pragma comment(lib, "crypt32.lib")
|
#pragma comment(lib, "crypt32.lib")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
void pdf::PDFPublicKeySignatureHandler::addTrustedCertificates(X509_STORE* store) const
|
void pdf::PDFPublicKeySignatureHandler::addTrustedCertificates(X509_STORE* store) const
|
||||||
{
|
{
|
||||||
|
@ -32,8 +32,10 @@
|
|||||||
#define SECURITY_WIN32
|
#define SECURITY_WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <security.h>
|
#include <security.h>
|
||||||
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
#pragma comment(lib, "Secur32.lib")
|
#pragma comment(lib, "Secur32.lib")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable:5033)
|
#pragma warning(disable:5033)
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#include <QToolBar>
|
#include <QToolBar>
|
||||||
#include <QXmlStreamWriter>
|
#include <QXmlStreamWriter>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
#pragma comment(lib, "Shell32")
|
#pragma comment(lib, "Shell32")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -413,6 +413,9 @@ void PDFTextToSpeech::onPlayClicked()
|
|||||||
updatePlay();
|
updatePlay();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateUI();
|
updateUI();
|
||||||
|
@ -19,8 +19,10 @@
|
|||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <sapi.h>
|
#include <sapi.h>
|
||||||
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
#pragma comment(lib, "ole32")
|
#pragma comment(lib, "ole32")
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace pdfplugin
|
namespace pdfplugin
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
#include <sapi.h>
|
#include <sapi.h>
|
||||||
|
|
||||||
|
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||||
#pragma comment(lib, "ole32")
|
#pragma comment(lib, "ole32")
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace pdftool
|
namespace pdftool
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user