mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix building with Qt 5.3.x
This commit is contained in:
parent
6f3c07341f
commit
e0e1dbc638
@ -492,17 +492,21 @@ class Build(Command):
|
||||
def build_headless(self):
|
||||
if iswindows or isosx:
|
||||
return # Dont have headless operation on these platforms
|
||||
from PyQt5.QtCore import QT_VERSION
|
||||
self.info('\n####### Building headless QPA plugin', '#'*7)
|
||||
a = Extension.absolutize
|
||||
headers = a([
|
||||
'calibre/headless/headless_backingstore.h',
|
||||
'calibre/headless/headless_integration.h',
|
||||
'calibre/headless/fontconfig_database.h'])
|
||||
])
|
||||
sources = a([
|
||||
'calibre/headless/main.cpp',
|
||||
'calibre/headless/headless_backingstore.cpp',
|
||||
'calibre/headless/headless_integration.cpp',
|
||||
'calibre/headless/fontconfig_database.cpp'])
|
||||
])
|
||||
if QT_VERSION >= 0x50401:
|
||||
headers.extend(a(['calibre/headless/fontconfig_database.h']))
|
||||
sources.extend(a(['calibre/headless/fontconfig_database.cpp']))
|
||||
others = a(['calibre/headless/headless.json'])
|
||||
target = self.dest('headless')
|
||||
if not self.newer(target, headers + sources + others):
|
||||
|
@ -1,6 +1,11 @@
|
||||
#include <QtGlobal>
|
||||
#include "headless_integration.h"
|
||||
#include "headless_backingstore.h"
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 1))
|
||||
#include "fontconfig_database.h"
|
||||
#else
|
||||
#include <QtPlatformSupport/private/qfontconfigdatabase_p.h>
|
||||
#endif
|
||||
#ifndef Q_OS_WIN
|
||||
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user