Skip to content

Commit 935fe46

Browse files
committed
Sync qmake build with upstream cmake build
1 parent def9873 commit 935fe46

1 file changed

Lines changed: 48 additions & 7 deletions

File tree

PDFWriter/PDFWriter.pro

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,38 @@ LIBS += -L$$LIBSDIR/ -lFreeType
1010
INCLUDEPATH += $$PWD/../FreeType/include
1111
DEPENDPATH += $$PWD/../FreeType/include
1212

13-
LIBS += -L$$LIBSDIR/ -lLibAesgm
14-
INCLUDEPATH += $$PWD/../LibAesgm
15-
DEPENDPATH += $$PWD/../LibAesgm
13+
#
14+
# Включаем AES из OpenSSL для поддержки PDF 2.0
15+
#
16+
DEFINES += USE_OPENSSL_AES=1
17+
18+
#
19+
# Подключаем библиотеку OpenSSL
20+
#
21+
linux {
22+
LIBS += -lcrypto
23+
}
24+
macx {
25+
# Homebrew на Apple Silicon
26+
OPENSSL_PREFIX = /opt/homebrew/opt/openssl@3
27+
!exists($$OPENSSL_PREFIX/include/openssl/evp.h): OPENSSL_PREFIX = /opt/homebrew/opt/openssl
28+
!exists($$OPENSSL_PREFIX/include/openssl/evp.h): OPENSSL_PREFIX = /usr/local/opt/openssl@3
29+
!exists($$OPENSSL_PREFIX/include/openssl/evp.h): OPENSSL_PREFIX = /usr/local/opt/openssl
30+
INCLUDEPATH += $$OPENSSL_PREFIX/include
31+
LIBS += -L$$OPENSSL_PREFIX/lib -lcrypto
32+
}
33+
win32 {
34+
OPENSSL_PREFIX = $$(OPENSSL_DIR)
35+
isEmpty(OPENSSL_PREFIX) {
36+
contains(QMAKE_TARGET.arch, x86_64)|contains(QT_ARCH, x86_64) {
37+
OPENSSL_PREFIX = "C:/Program Files/OpenSSL-Win64"
38+
} else {
39+
OPENSSL_PREFIX = "C:/Program Files (x86)/OpenSSL-Win32"
40+
}
41+
}
42+
INCLUDEPATH += $$OPENSSL_PREFIX/include
43+
LIBS += -L$$OPENSSL_PREFIX/lib -llibcrypto
44+
}
1645

1746
LIBS += -L$$LIBSDIR/ -lLibJpeg
1847
INCLUDEPATH += $$PWD/../LibJpeg
@@ -40,11 +69,15 @@ HEADERS += \
4069
AbstractContentContext.h \
4170
AbstractWrittenFont.h \
4271
AdapterIByteReaderWithPositionToIReadPositionProvider.h \
72+
AESConstants.h \
4373
ANSIFontWriter.h \
4474
Ascii7Encoding.h \
4575
ArrayOfInputStreamsStream.h \
4676
BetweenIncluding.h \
4777
BoxingBase.h \
78+
ByteList.h \
79+
ByteListSSOImpl.h \
80+
ByteListVectorImpl.h \
4881
CatalogInformation.h \
4982
CFFANSIFontWriter.h \
5083
CFFDescendentFontWriter.h \
@@ -86,6 +119,7 @@ HEADERS += \
86119
GraphicState.h \
87120
GraphicStateStack.h \
88121
IANSIFontWriterHelper.h \
122+
IByteListImpl.h \
89123
IByteReader.h \
90124
IByteReaderWithPosition.h \
91125
IByteWriter.h \
@@ -100,7 +134,7 @@ HEADERS += \
100134
IFreeTypeFaceExtender.h \
101135
IndirectObjectsReferenceRegistry.h \
102136
InfoDictionary.h \
103-
InputAESDecodeStream.h \
137+
InputAESDecodeStreamSSL.h \
104138
InputAscii85DecodeStream.h \
105139
InputAsciiHexDecodeStream.h \
106140
InputBufferedStream.h \
@@ -145,7 +179,7 @@ HEADERS += \
145179
ObjectsContextExtenderAdapter.h \
146180
OpenTypeFileInput.h \
147181
OpenTypePrimitiveReader.h \
148-
OutputAESEncodeStream.h \
182+
OutputAESEncodeStreamSSL.h \
149183
OutputBufferedStream.h \
150184
OutputFile.h \
151185
OutputFileStream.h \
@@ -241,6 +275,8 @@ HEADERS += \
241275
WrittenFontRepresentation.h \
242276
WrittenFontTrueType.h \
243277
XCryptionCommon.h \
278+
XCryptionCommon2_0.h \
279+
XCryptor.h \
244280
XObjectContentContext.h \
245281

246282
SOURCES += \
@@ -249,6 +285,9 @@ SOURCES += \
249285
ANSIFontWriter.cpp \
250286
Ascii7Encoding.cpp \
251287
ArrayOfInputStreamsStream.cpp \
288+
ByteList.cpp \
289+
ByteListSSOImpl.cpp \
290+
ByteListVectorImpl.cpp \
252291
CatalogInformation.cpp \
253292
CFFANSIFontWriter.cpp \
254293
CFFDescendentFontWriter.cpp \
@@ -279,7 +318,7 @@ SOURCES += \
279318
GraphicStateStack.cpp \
280319
IndirectObjectsReferenceRegistry.cpp \
281320
InfoDictionary.cpp \
282-
InputAESDecodeStream.cpp \
321+
InputAESDecodeStreamSSL.cpp \
283322
InputAscii85DecodeStream.cpp \
284323
InputAsciiHexDecodeStream.cpp \
285324
InputBufferedStream.cpp \
@@ -310,7 +349,7 @@ SOURCES += \
310349
ObjectsContext.cpp \
311350
OpenTypeFileInput.cpp \
312351
OpenTypePrimitiveReader.cpp \
313-
OutputAESEncodeStream.cpp \
352+
OutputAESEncodeStreamSSL.cpp \
314353
OutputBufferedStream.cpp \
315354
OutputFile.cpp \
316355
OutputFileStream.cpp \
@@ -398,5 +437,7 @@ SOURCES += \
398437
WrittenFontCFF.cpp \
399438
WrittenFontTrueType.cpp \
400439
XCryptionCommon.cpp \
440+
XCryptionCommon2_0.cpp \
441+
XCryptor.cpp \
401442
XObjectContentContext.cpp \
402443

0 commit comments

Comments
 (0)