2019-07-01 12:35:53 +02:00
|
|
|
# Copyright (C) 2018-2019 Jakub Melka
|
2018-11-17 16:48:30 +01:00
|
|
|
#
|
|
|
|
# This file is part of PdfForQt.
|
|
|
|
#
|
|
|
|
# PdfForQt is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# PdfForQt is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# along with PDFForQt. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
2019-01-27 17:55:22 +01:00
|
|
|
QT += gui widgets
|
2018-11-17 16:48:30 +01:00
|
|
|
|
|
|
|
TARGET = PdfForQtLib
|
|
|
|
TEMPLATE = lib
|
|
|
|
|
|
|
|
DEFINES += PDFFORQTLIB_LIBRARY
|
|
|
|
|
|
|
|
# The following define makes your compiler emit warnings if you use
|
|
|
|
# any feature of Qt which has been marked as deprecated (the exact warnings
|
|
|
|
# depend on your compiler). Please consult the documentation of the
|
|
|
|
# deprecated API in order to know how to port your code away from it.
|
|
|
|
DEFINES += QT_DEPRECATED_WARNINGS
|
|
|
|
|
|
|
|
# You can also make your code fail to compile if you use deprecated APIs.
|
|
|
|
# In order to do so, uncomment the following line.
|
|
|
|
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
|
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
|
|
|
|
|
|
DESTDIR = $$OUT_PWD/..
|
|
|
|
|
|
|
|
SOURCES += \
|
2019-09-29 15:44:35 +02:00
|
|
|
sources/pdfblendfunction.cpp \
|
2019-10-06 17:36:43 +02:00
|
|
|
sources/pdfccittfaxdecoder.cpp \
|
2019-07-01 19:53:38 +02:00
|
|
|
sources/pdfitemmodels.cpp \
|
2019-10-20 17:41:36 +02:00
|
|
|
sources/pdfjbig2decoder.cpp \
|
2018-11-17 16:48:30 +01:00
|
|
|
sources/pdfobject.cpp \
|
2019-06-23 18:35:32 +02:00
|
|
|
sources/pdfoptionalcontent.cpp \
|
2018-11-17 16:48:30 +01:00
|
|
|
sources/pdfparser.cpp \
|
|
|
|
sources/pdfdocument.cpp \
|
2018-11-21 19:30:15 +01:00
|
|
|
sources/pdfdocumentreader.cpp \
|
2019-08-25 18:16:37 +02:00
|
|
|
sources/pdfpattern.cpp \
|
2019-11-09 17:27:17 +01:00
|
|
|
sources/pdfprogress.cpp \
|
2019-08-04 18:26:15 +02:00
|
|
|
sources/pdfsecurityhandler.cpp \
|
2019-05-10 19:48:52 +02:00
|
|
|
sources/pdfutils.cpp \
|
2018-12-01 11:36:07 +01:00
|
|
|
sources/pdfxreftable.cpp \
|
2018-12-02 17:53:19 +01:00
|
|
|
sources/pdfvisitor.cpp \
|
2018-12-14 19:41:12 +01:00
|
|
|
sources/pdfencoding.cpp \
|
2018-12-26 18:00:17 +01:00
|
|
|
sources/pdfcatalog.cpp \
|
2018-12-29 18:22:13 +01:00
|
|
|
sources/pdfpage.cpp \
|
2019-01-20 17:55:06 +01:00
|
|
|
sources/pdfstreamfilters.cpp \
|
2019-01-27 17:55:22 +01:00
|
|
|
sources/pdfdrawspacecontroller.cpp \
|
2019-02-09 18:40:56 +01:00
|
|
|
sources/pdfdrawwidget.cpp \
|
|
|
|
sources/pdfcolorspaces.cpp \
|
2019-02-24 17:48:37 +01:00
|
|
|
sources/pdfrenderer.cpp \
|
|
|
|
sources/pdfpagecontentprocessor.cpp \
|
2019-02-24 19:42:00 +01:00
|
|
|
sources/pdfpainter.cpp \
|
2019-03-03 16:14:38 +01:00
|
|
|
sources/pdfrenderingerrorswidget.cpp \
|
2019-03-25 18:44:45 +01:00
|
|
|
sources/pdffunction.cpp \
|
|
|
|
sources/pdfnametounicode.cpp \
|
2019-05-07 18:21:22 +02:00
|
|
|
sources/pdffont.cpp \
|
|
|
|
sources/pdfimage.cpp
|
2018-11-17 16:48:30 +01:00
|
|
|
|
|
|
|
HEADERS += \
|
2019-09-29 15:44:35 +02:00
|
|
|
sources/pdfblendfunction.h \
|
2019-10-06 17:36:43 +02:00
|
|
|
sources/pdfccittfaxdecoder.h \
|
2019-07-01 19:53:38 +02:00
|
|
|
sources/pdfitemmodels.h \
|
2019-10-20 17:41:36 +02:00
|
|
|
sources/pdfjbig2decoder.h \
|
2019-09-28 18:26:31 +02:00
|
|
|
sources/pdfmeshqualitysettings.h \
|
2018-11-17 16:48:30 +01:00
|
|
|
sources/pdfobject.h \
|
2019-06-23 18:35:32 +02:00
|
|
|
sources/pdfoptionalcontent.h \
|
2018-11-17 16:48:30 +01:00
|
|
|
sources/pdfparser.h \
|
|
|
|
sources/pdfglobal.h \
|
|
|
|
sources/pdfconstants.h \
|
|
|
|
sources/pdfdocument.h \
|
2018-11-21 19:30:15 +01:00
|
|
|
sources/pdfdocumentreader.h \
|
2019-08-25 18:16:37 +02:00
|
|
|
sources/pdfpattern.h \
|
2019-11-09 17:27:17 +01:00
|
|
|
sources/pdfprogress.h \
|
2019-08-04 18:26:15 +02:00
|
|
|
sources/pdfsecurityhandler.h \
|
2018-11-25 17:57:39 +01:00
|
|
|
sources/pdfxreftable.h \
|
2018-12-01 11:36:07 +01:00
|
|
|
sources/pdfflatmap.h \
|
2018-12-02 17:53:19 +01:00
|
|
|
sources/pdfvisitor.h \
|
2018-12-14 19:41:12 +01:00
|
|
|
sources/pdfencoding.h \
|
2018-12-24 17:09:23 +01:00
|
|
|
sources/pdfcatalog.h \
|
2018-12-26 18:00:17 +01:00
|
|
|
sources/pdfnumbertreeloader.h \
|
2018-12-29 18:22:13 +01:00
|
|
|
sources/pdfpage.h \
|
2019-01-20 17:55:06 +01:00
|
|
|
sources/pdfstreamfilters.h \
|
2019-01-27 17:55:22 +01:00
|
|
|
sources/pdfdrawspacecontroller.h \
|
2019-02-09 18:40:56 +01:00
|
|
|
sources/pdfdrawwidget.h \
|
|
|
|
sources/pdfflatarray.h \
|
|
|
|
sources/pdfcolorspaces.h \
|
2019-02-14 19:45:07 +01:00
|
|
|
sources/pdfrenderer.h \
|
2019-02-24 17:48:37 +01:00
|
|
|
sources/pdfpagecontentprocessor.h \
|
|
|
|
sources/pdfpainter.h \
|
2019-02-24 19:42:00 +01:00
|
|
|
sources/pdfutils.h \
|
2019-03-03 16:14:38 +01:00
|
|
|
sources/pdfrenderingerrorswidget.h \
|
2019-03-25 18:44:45 +01:00
|
|
|
sources/pdffunction.h \
|
|
|
|
sources/pdfnametounicode.h \
|
2019-04-29 17:03:19 +02:00
|
|
|
sources/pdffont.h \
|
2019-05-07 18:21:22 +02:00
|
|
|
sources/pdfexception.h \
|
|
|
|
sources/pdfimage.h
|
2018-11-17 16:48:30 +01:00
|
|
|
|
2019-04-29 14:14:06 +02:00
|
|
|
FORMS += \
|
|
|
|
sources/pdfrenderingerrorswidget.ui
|
2018-11-25 14:48:08 +01:00
|
|
|
|
2019-07-31 18:19:23 +02:00
|
|
|
PDFFORQT_DEPENDENCIES_PATH = K:\Programming\PDF\PDF_For_Qt\PDfForQt-Dependencies
|
|
|
|
|
2019-04-07 19:39:29 +02:00
|
|
|
# Link to freetype library
|
2019-07-31 18:19:23 +02:00
|
|
|
LIBS += -L$$PDFFORQT_DEPENDENCIES_PATH/FreeType/ -lfreetype
|
|
|
|
INCLUDEPATH += $$PDFFORQT_DEPENDENCIES_PATH/FreeType/include
|
|
|
|
DEPENDPATH += $$PDFFORQT_DEPENDENCIES_PATH/FreeType/include
|
2019-04-07 19:39:29 +02:00
|
|
|
|
2019-04-29 14:14:06 +02:00
|
|
|
# Add freetype to installations
|
2019-07-31 18:19:23 +02:00
|
|
|
freetype_lib.files = $$PDFFORQT_DEPENDENCIES_PATH/FreeType/freetype.dll
|
|
|
|
freetype_lib.path = $$DESTDIR/install
|
2019-04-07 19:39:29 +02:00
|
|
|
INSTALLS += freetype_lib
|
|
|
|
|
2019-05-07 18:21:22 +02:00
|
|
|
# Link to OpenJPEG library
|
2019-07-31 18:19:23 +02:00
|
|
|
LIBS += -L$$PDFFORQT_DEPENDENCIES_PATH/OpenJPEG/lib/ -lopenjp2
|
|
|
|
INCLUDEPATH += $$PDFFORQT_DEPENDENCIES_PATH/OpenJPEG/include/openjpeg-2.3
|
|
|
|
DEPENDPATH += $$PDFFORQT_DEPENDENCIES_PATH/OpenJPEG/include/openjpeg-2.3
|
2019-05-07 18:21:22 +02:00
|
|
|
|
|
|
|
# Add OpenJPEG to installations
|
2019-07-31 18:19:23 +02:00
|
|
|
openjpeg_lib.files = $$PDFFORQT_DEPENDENCIES_PATH/OpenJPEG/bin/openjp2.dll
|
|
|
|
openjpeg_lib.path = $$DESTDIR/install
|
2019-05-07 18:21:22 +02:00
|
|
|
INSTALLS += openjpeg_lib
|
|
|
|
|
|
|
|
# Link to Independent JPEG Groups libjpeg
|
2019-07-31 18:19:23 +02:00
|
|
|
LIBS += -L$$PDFFORQT_DEPENDENCIES_PATH/libjpeg/bin/ -ljpeg
|
|
|
|
INCLUDEPATH += $$PDFFORQT_DEPENDENCIES_PATH/libjpeg/include
|
|
|
|
DEPENDPATH += $$PDFFORQT_DEPENDENCIES_PATH/libjpeg/include
|
|
|
|
|
2019-10-05 13:08:32 +02:00
|
|
|
# Add libjpeg to installations
|
|
|
|
libjpeg.files = $$PDFFORQT_DEPENDENCIES_PATH/libjpeg/bin/jpeg.dll
|
|
|
|
libjpeg.path = $$DESTDIR/install
|
|
|
|
INSTALLS += libjpeg
|
|
|
|
|
2019-07-31 18:19:23 +02:00
|
|
|
# Link OpenSSL
|
|
|
|
LIBS += -L$$PDFFORQT_DEPENDENCIES_PATH/OpenSSL/ -llibcrypto -llibssl
|
|
|
|
INCLUDEPATH += $$PDFFORQT_DEPENDENCIES_PATH/OpenSSL/include
|
|
|
|
DEPENDPATH += $$PDFFORQT_DEPENDENCIES_PATH/OpenSSL/include
|
|
|
|
|
|
|
|
# Add OpenSSL to installations
|
|
|
|
openssl_lib.files = $$PDFFORQT_DEPENDENCIES_PATH/OpenSSL/libcrypto-3.dll $$PDFFORQT_DEPENDENCIES_PATH/OpenSSL/libssl-3.dll
|
|
|
|
openssl_lib.path = $$DESTDIR/install
|
|
|
|
INSTALLS += openssl_lib
|
2019-05-07 18:21:22 +02:00
|
|
|
|
2019-08-18 16:03:41 +02:00
|
|
|
# Link zlib
|
|
|
|
LIBS += -L$$PDFFORQT_DEPENDENCIES_PATH/zlib/bin/ -lzlib
|
|
|
|
INCLUDEPATH += $$PDFFORQT_DEPENDENCIES_PATH/zlib/include
|
|
|
|
DEPENDPATH += $$PDFFORQT_DEPENDENCIES_PATH/zlib/include
|
|
|
|
|
|
|
|
# Add zlib to installations
|
|
|
|
zlib.files = $$PDFFORQT_DEPENDENCIES_PATH/zlib/bin/zlib.dll
|
|
|
|
zlib.path = $$DESTDIR/install
|
|
|
|
INSTALLS += zlib
|
|
|
|
|
2019-04-29 14:14:06 +02:00
|
|
|
# ensure debug info even for RELEASE build
|
2018-11-25 14:48:08 +01:00
|
|
|
CONFIG += force_debug_info
|
|
|
|
|
2018-12-02 17:53:19 +01:00
|
|
|
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
2019-02-24 19:42:00 +01:00
|
|
|
|
2019-04-29 14:14:06 +02:00
|
|
|
# resource manifest
|
|
|
|
CMAP_RESOURCE_INPUT = $$PWD/cmaps.qrc
|
|
|
|
cmap_resource_builder.commands = $$[QT_HOST_BINS]/rcc -binary ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} -threshold 0 -compress 9
|
|
|
|
cmap_resource_builder.depend_command = $$[QT_HOST_BINS]/rcc -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
|
|
|
|
cmap_resource_builder.input = CMAP_RESOURCE_INPUT
|
|
|
|
cmap_resource_builder.output = $$DESTDIR/${QMAKE_FILE_IN_BASE}.qrb
|
|
|
|
cmap_resource_builder.CONFIG += no_link target_predeps
|
|
|
|
QMAKE_EXTRA_COMPILERS += cmap_resource_builder
|
2019-04-27 14:14:07 +02:00
|
|
|
|
2019-07-31 18:19:23 +02:00
|
|
|
cmaps_files.files = $$DESTDIR/cmaps.qrb
|
|
|
|
cmaps_files.path = $$DESTDIR/install
|
|
|
|
|
|
|
|
INSTALLS += cmaps_files
|
|
|
|
|
|
|
|
pdfforqt_library.files = $$DESTDIR/PdfForQtLib.dll
|
|
|
|
pdfforqt_library.path = $$DESTDIR/install
|
|
|
|
|
|
|
|
INSTALLS += pdfforqt_library
|
|
|
|
|
|
|
|
CONFIG(debug, debug|release) {
|
|
|
|
SUFFIX = d
|
|
|
|
}
|
|
|
|
|
|
|
|
qt_libraries.files = $$[QT_INSTALL_BINS]/Qt?Widgets$${SUFFIX}.dll \
|
|
|
|
$$[QT_INSTALL_BINS]/Qt?Gui$${SUFFIX}.dll \
|
|
|
|
$$[QT_INSTALL_BINS]/Qt?Core$${SUFFIX}.dll
|
|
|
|
qt_libraries.path = $$DESTDIR/install
|
|
|
|
INSTALLS += qt_libraries
|