PDF4QT/Pdf4QtLib/Pdf4QtLib.pro

339 lines
12 KiB
Prolog
Raw Normal View History

2022-06-05 18:13:50 +02:00
# Copyright (C) 2018-2022 Jakub Melka
2021-09-27 11:14:20 +02:00
#
# This file is part of PDF4QT.
#
# PDF4QT 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
# with the written consent of the copyright owner, any later version.
#
# PDF4QT 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 PDF4QT. If not, see <https://www.gnu.org/licenses/>.
2022-02-19 19:30:52 +01:00
QT += gui widgets xml svg
2021-09-27 11:14:20 +02:00
TARGET = Pdf4QtLib
TEMPLATE = lib
include(../Pdf4Qt.pri)
2021-09-27 11:14:20 +02:00
QMAKE_TARGET_DESCRIPTION = "PDF rendering / editing library for Qt"
2022-06-05 18:13:50 +02:00
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
2021-09-27 11:14:20 +02:00
DEFINES += PDF4QTLIB_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 += \
sources/pdfaction.cpp \
sources/pdfadvancedtools.cpp \
sources/pdfalgorithmlcs.cpp \
2021-09-27 11:14:20 +02:00
sources/pdfannotation.cpp \
sources/pdfblendfunction.cpp \
sources/pdfccittfaxdecoder.cpp \
sources/pdfcertificatemanager.cpp \
sources/pdfcertificatemanagerdialog.cpp \
2021-09-27 11:14:20 +02:00
sources/pdfcms.cpp \
sources/pdfcompiler.cpp \
sources/pdfcreatecertificatedialog.cpp \
2021-09-03 20:54:55 +02:00
sources/pdfdiff.cpp \
2021-09-27 11:14:20 +02:00
sources/pdfdocumentbuilder.cpp \
sources/pdfdocumentmanipulator.cpp \
sources/pdfdocumenttextflow.cpp \
sources/pdfdocumenttextfloweditormodel.cpp \
sources/pdfdocumentwriter.cpp \
sources/pdfexecutionpolicy.cpp \
sources/pdffile.cpp \
sources/pdfform.cpp \
2021-10-06 19:22:35 +02:00
sources/pdficontheme.cpp \
2021-09-27 11:14:20 +02:00
sources/pdfitemmodels.cpp \
sources/pdfjavascriptscanner.cpp \
sources/pdfjbig2decoder.cpp \
sources/pdfmultimedia.cpp \
sources/pdfobject.cpp \
sources/pdfobjecteditormodel.cpp \
sources/pdfobjecteditorwidget.cpp \
sources/pdfobjectutils.cpp \
sources/pdfoptimizer.cpp \
sources/pdfoptionalcontent.cpp \
sources/pdfoutline.cpp \
2022-04-06 20:36:18 +02:00
sources/pdfpagecontenteditorstylesettings.cpp \
2022-02-11 19:15:57 +01:00
sources/pdfpagecontenteditortools.cpp \
2022-02-24 20:25:18 +01:00
sources/pdfpagecontenteditorwidget.cpp \
2022-02-11 19:15:57 +01:00
sources/pdfpagecontentelements.cpp \
2021-09-27 11:14:20 +02:00
sources/pdfpagenavigation.cpp \
sources/pdfpagetransition.cpp \
sources/pdfpainterutils.cpp \
sources/pdfparser.cpp \
sources/pdfdocument.cpp \
sources/pdfdocumentreader.cpp \
sources/pdfpattern.cpp \
sources/pdfplugin.cpp \
sources/pdfprogress.cpp \
sources/pdfredact.cpp \
sources/pdfsecurityhandler.cpp \
sources/pdfselectpagesdialog.cpp \
sources/pdfsignaturehandler.cpp \
sources/pdfsnapper.cpp \
sources/pdfstructuretree.cpp \
2022-03-26 19:26:32 +01:00
sources/pdftexteditpseudowidget.cpp \
2021-09-27 11:14:20 +02:00
sources/pdftextlayout.cpp \
sources/pdftransparencyrenderer.cpp \
sources/pdfutils.cpp \
sources/pdfwidgettool.cpp \
sources/pdfwidgetutils.cpp \
2021-10-27 19:23:40 +02:00
sources/pdfxfaengine.cpp \
2021-09-27 11:14:20 +02:00
sources/pdfxreftable.cpp \
sources/pdfvisitor.cpp \
sources/pdfencoding.cpp \
sources/pdfcatalog.cpp \
sources/pdfpage.cpp \
sources/pdfstreamfilters.cpp \
sources/pdfdrawspacecontroller.cpp \
sources/pdfdrawwidget.cpp \
sources/pdfcolorspaces.cpp \
sources/pdfrenderer.cpp \
sources/pdfpagecontentprocessor.cpp \
sources/pdfpainter.cpp \
sources/pdfrenderingerrorswidget.cpp \
sources/pdffunction.cpp \
sources/pdfnametounicode.cpp \
sources/pdffont.cpp \
sources/pdfimage.cpp
HEADERS += \
sources/pdfaction.h \
sources/pdfadvancedtools.h \
2021-09-09 18:28:55 +02:00
sources/pdfalgorithmlcs.h \
2021-09-27 11:14:20 +02:00
sources/pdfannotation.h \
sources/pdfblendfunction.h \
sources/pdfccittfaxdecoder.h \
sources/pdfcertificatemanager.h \
sources/pdfcertificatemanagerdialog.h \
2021-09-27 11:14:20 +02:00
sources/pdfcms.h \
sources/pdfcompiler.h \
sources/pdfcreatecertificatedialog.h \
2022-01-30 18:23:25 +01:00
sources/pdfdbgheap.h \
2021-09-03 20:54:55 +02:00
sources/pdfdiff.h \
2021-09-27 11:14:20 +02:00
sources/pdfdocumentbuilder.h \
sources/pdfdocumentdrawinterface.h \
sources/pdfdocumentmanipulator.h \
sources/pdfdocumenttextflow.h \
sources/pdfdocumenttextfloweditormodel.h \
sources/pdfdocumentwriter.h \
sources/pdfexecutionpolicy.h \
sources/pdffile.h \
sources/pdfform.h \
2021-10-06 19:22:35 +02:00
sources/pdficontheme.h \
2021-09-27 11:14:20 +02:00
sources/pdfitemmodels.h \
sources/pdfjavascriptscanner.h \
sources/pdfjbig2decoder.h \
sources/pdfmeshqualitysettings.h \
sources/pdfmultimedia.h \
sources/pdfnametreeloader.h \
sources/pdfobject.h \
sources/pdfobjecteditormodel.h \
sources/pdfobjecteditorwidget.h \
sources/pdfobjecteditorwidget_impl.h \
sources/pdfobjectutils.h \
sources/pdfoperationcontrol.h \
2021-09-27 11:14:20 +02:00
sources/pdfoptimizer.h \
sources/pdfoptionalcontent.h \
sources/pdfoutline.h \
2022-04-06 20:36:18 +02:00
sources/pdfpagecontenteditorstylesettings.h \
2022-02-11 19:15:57 +01:00
sources/pdfpagecontenteditortools.h \
2022-02-24 20:25:18 +01:00
sources/pdfpagecontenteditorwidget.h \
2022-02-11 19:15:57 +01:00
sources/pdfpagecontentelements.h \
2021-09-27 11:14:20 +02:00
sources/pdfpagenavigation.h \
sources/pdfpagetransition.h \
sources/pdfpainterutils.h \
sources/pdfparser.h \
sources/pdfglobal.h \
sources/pdfconstants.h \
sources/pdfdocument.h \
sources/pdfdocumentreader.h \
sources/pdfpattern.h \
sources/pdfplugin.h \
sources/pdfprogress.h \
sources/pdfredact.h \
sources/pdfsecurityhandler.h \
sources/pdfselectpagesdialog.h \
sources/pdfsignaturehandler.h \
sources/pdfsignaturehandler_impl.h \
sources/pdfsnapper.h \
sources/pdfstructuretree.h \
2022-03-26 19:26:32 +01:00
sources/pdftexteditpseudowidget.h \
2021-09-27 11:14:20 +02:00
sources/pdftextlayout.h \
sources/pdftransparencyrenderer.h \
sources/pdfwidgettool.h \
sources/pdfwidgetutils.h \
2021-10-27 19:23:40 +02:00
sources/pdfxfaengine.h \
2021-09-27 11:14:20 +02:00
sources/pdfxreftable.h \
sources/pdfflatmap.h \
sources/pdfvisitor.h \
sources/pdfencoding.h \
sources/pdfcatalog.h \
sources/pdfnumbertreeloader.h \
sources/pdfpage.h \
sources/pdfstreamfilters.h \
sources/pdfdrawspacecontroller.h \
sources/pdfdrawwidget.h \
sources/pdfflatarray.h \
sources/pdfcolorspaces.h \
sources/pdfrenderer.h \
sources/pdfpagecontentprocessor.h \
sources/pdfpainter.h \
sources/pdfutils.h \
sources/pdfrenderingerrorswidget.h \
sources/pdffunction.h \
sources/pdfnametounicode.h \
sources/pdffont.h \
sources/pdfexception.h \
sources/pdfimage.h
FORMS += \
sources/pdfcertificatemanagerdialog.ui \
sources/pdfcreatecertificatedialog.ui \
2022-04-06 20:36:18 +02:00
sources/pdfpagecontenteditorstylesettings.ui \
2022-02-24 20:25:18 +01:00
sources/pdfpagecontenteditorwidget.ui \
2021-09-27 11:14:20 +02:00
sources/pdfrenderingerrorswidget.ui \
sources/pdfselectpagesdialog.ui
RESOURCES += cmaps.qrc
Pdf4Qt_DEPENDENCIES_PATH = $$absolute_path(../../PdfforQt-Dependencies, $$PWD)
Pdf4Qt_OPENSSL_PATH = $$absolute_path(../../Tools, $$[QT_INSTALL_PREFIX])
CONFIG(debug, debug|release) {
SUFFIX = d
}
win32-msvc*: {
# Link to freetype library
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/FreeType/ -lfreetype$${SUFFIX}
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/FreeType/include
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/FreeType/include
2021-09-27 11:14:20 +02:00
# Link to OpenJPEG library
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/lib/ -lopenjp2$${SUFFIX}
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/include/openjpeg-2.3
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/include/openjpeg-2.3
DEFINES += OPJ_STATIC
2021-09-27 11:14:20 +02:00
# Link to Independent JPEG Groups libjpeg
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/bin/ -ljpeg$${SUFFIX}
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/include
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/include
2021-09-27 11:14:20 +02:00
# Link OpenSSL
LIBS += -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/lib -llibcrypto -llibssl
INCLUDEPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
DEPENDPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
2021-09-27 11:14:20 +02:00
# Add OpenSSL to installations
openssl_lib.files = $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin/libcrypto-1_1-x64.dll $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin/libssl-1_1-x64.dll
openssl_lib.path = $$DESTDIR/install
INSTALLS += openssl_lib
2021-09-27 11:14:20 +02:00
# Link zlib
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/zlib/bin/ -lzlibstatic$${SUFFIX}
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/zlib/include
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/zlib/include
2021-09-27 11:14:20 +02:00
# Link lcms2
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/lcms2/bin$${SUFFIX}/ -llcms2_static
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/lcms2/include
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/lcms2/include
}
win32-*g++|unix: {
PKGCONFIG += freetype2 libopenjp2 libjpeg lcms2 libssl libcrypto zlib
LIBS += -ltbb
win32: {
LIBS += -lmscms -lcrypt32 -lsecur32
}
}
2021-09-27 11:14:20 +02:00
# ensure debug info even for RELEASE build
CONFIG += force_debug_info
2021-09-27 11:14:20 +02:00
QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
PdfforQt_library.files = $$DESTDIR/Pdf4QtLib.dll
PdfforQt_library.path = $$DESTDIR/install
PdfforQt_library.CONFIG += no_check_exist
INSTALLS += PdfforQt_library
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_INSTALL_BINS]/Qt?WinExtras$${SUFFIX}.dll \
$$[QT_INSTALL_BINS]/Qt?Svg$${SUFFIX}.dll \
$$[QT_INSTALL_BINS]/Qt?PrintSupport$${SUFFIX}.dll \
$$[QT_INSTALL_BINS]/Qt?TextToSpeech$${SUFFIX}.dll \
$$[QT_INSTALL_BINS]/Qt?Network$${SUFFIX}.dll \
$$[QT_INSTALL_BINS]/Qt?Xml$${SUFFIX}.dll
qt_libraries.path = $$DESTDIR/install
INSTALLS += qt_libraries
qt_plugin_platform.files = $$[QT_INSTALL_PLUGINS]/platforms/qwindows$${SUFFIX}.dll
qt_plugin_platform.path = $$DESTDIR/install/platforms
INSTALLS += qt_plugin_platform
qt_plugin_style.files = $$[QT_INSTALL_PLUGINS]/styles/qwindowsvistastyle$${SUFFIX}.dll
qt_plugin_style.path = $$DESTDIR/install/styles
INSTALLS += qt_plugin_style
qt_plugin_imageformat.files = $$[QT_INSTALL_PLUGINS]/imageformats/qgif$${SUFFIX}.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qicns$${SUFFIX}.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qico$${SUFFIX}.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${SUFFIX}.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${SUFFIX}.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qtga$${SUFFIX}.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qtiff$${SUFFIX}.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qwbpm$${SUFFIX}.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qwebp$${SUFFIX}.dll
qt_plugin_imageformat.path = $$DESTDIR/install/imageformats
INSTALLS += qt_plugin_imageformat
qt_plugin_iconengine.files = $$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon$${SUFFIX}.dll
qt_plugin_iconengine.path = $$DESTDIR/install/iconengines
INSTALLS += qt_plugin_iconengine
qt_plugin_printsupport.files = $$[QT_INSTALL_PLUGINS]/printsupport/windowsprintersupport$${SUFFIX}.dll
qt_plugin_printsupport.path = $$DESTDIR/install/printsupport
INSTALLS += qt_plugin_printsupport
qt_plugin_texttospeech.files = $$[QT_INSTALL_PLUGINS]/texttospeech/qtexttospeech_sapi$${SUFFIX}.dll
qt_plugin_texttospeech.path = $$DESTDIR/install/texttospeech
INSTALLS += qt_plugin_texttospeech
VC_REDIST_FILES = $$files($$(VCToolsRedistDir)/$$(VSCMD_ARG_TGT_ARCH)/Microsoft.VC143.CRT/*.dll)
vc_redist.files = $$VC_REDIST_FILES
vc_redist.path = $$DESTDIR/install
INSTALLS += vc_redist
# Debug code for list of all variables and its values
#for(var, $$list($$enumerate_vars())) {
# value = $$eval($$var)
# message($$var = $$value)
#}