mirror of https://github.com/JakubMelka/PDF4QT.git
MinGW compilation fix
This commit is contained in:
parent
f814a85df8
commit
c75b8d677c
|
@ -34,8 +34,10 @@
|
|||
#define NOMINMAX
|
||||
#include <Windows.h>
|
||||
#include <Icm.h>
|
||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||
#pragma comment(lib, "Mscms")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
|
|
|
@ -34,15 +34,18 @@
|
|||
#include <QPainterPath>
|
||||
#include <QDataStream>
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include "Windows.h"
|
||||
|
||||
#pragma comment(lib, "Gdi32")
|
||||
#pragma comment(lib, "User32")
|
||||
#elif defined(Q_OS_UNIX)
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#endif
|
||||
|
||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||
#pragma comment(lib, "Gdi32")
|
||||
#pragma comment(lib, "User32")
|
||||
#endif
|
||||
|
||||
namespace pdf
|
||||
{
|
||||
/// Storage class for system fonts
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
||||
|
|
|
@ -2009,8 +2009,10 @@ void PDFCertificateStore::createDirectoryForDefaultUserCertificatesStore()
|
|||
#ifdef Q_OS_WIN
|
||||
#include <Windows.h>
|
||||
#include <wincrypt.h>
|
||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||
#pragma comment(lib, "crypt32.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void pdf::PDFPublicKeySignatureHandler::addTrustedCertificates(X509_STORE* store) const
|
||||
{
|
||||
|
|
|
@ -32,8 +32,10 @@
|
|||
#define SECURITY_WIN32
|
||||
#include <Windows.h>
|
||||
#include <security.h>
|
||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||
#pragma comment(lib, "Secur32.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:5033)
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include <QToolBar>
|
||||
#include <QXmlStreamWriter>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||
#pragma comment(lib, "Shell32")
|
||||
#endif
|
||||
|
||||
|
|
|
@ -413,6 +413,9 @@ void PDFTextToSpeech::onPlayClicked()
|
|||
updatePlay();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
updateUI();
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <sapi.h>
|
||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||
#pragma comment(lib, "ole32")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace pdfplugin
|
||||
{
|
||||
|
|
|
@ -23,7 +23,9 @@
|
|||
|
||||
#include <sapi.h>
|
||||
|
||||
#if defined(PDF4QT_USE_PRAGMA_LIB)
|
||||
#pragma comment(lib, "ole32")
|
||||
#endif
|
||||
|
||||
namespace pdftool
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue