PDF4QT/Pdf4QtLibCore/CMakeLists.txt

125 lines
4.4 KiB
CMake
Raw Normal View History

2023-12-03 19:11:17 +01:00
# Copyright (C) 2022-2023 Jakub Melka
2022-08-14 17:50:52 +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/>.
2023-12-03 19:11:17 +01:00
add_library(Pdf4QtLibCore SHARED
2022-08-14 17:50:52 +02:00
sources/pdfaction.cpp
sources/pdfalgorithmlcs.cpp
sources/pdfannotation.cpp
sources/pdfblendfunction.cpp
sources/pdfccittfaxdecoder.cpp
sources/pdfcertificatemanager.cpp
sources/pdfcms.cpp
sources/pdfcompiler.cpp
sources/pdfdiff.cpp
sources/pdfdocumentbuilder.cpp
sources/pdfdocumentmanipulator.cpp
sources/pdfdocumenttextflow.cpp
sources/pdfdocumenttextfloweditormodel.cpp
sources/pdfdocumentwriter.cpp
sources/pdfexecutionpolicy.cpp
sources/pdffile.cpp
sources/pdfform.cpp
sources/pdficontheme.cpp
sources/pdfjavascriptscanner.cpp
sources/pdfjbig2decoder.cpp
sources/pdfmultimedia.cpp
sources/pdfobject.cpp
sources/pdfobjecteditormodel.cpp
sources/pdfobjectutils.cpp
sources/pdfoptimizer.cpp
sources/pdfoptionalcontent.cpp
sources/pdfoutline.cpp
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/pdfsignaturehandler.cpp
sources/pdfsnapper.cpp
sources/pdfstructuretree.cpp
sources/pdftextlayout.cpp
sources/pdftransparencyrenderer.cpp
sources/pdfutils.cpp
sources/pdfxfaengine.cpp
sources/pdfxreftable.cpp
sources/pdfvisitor.cpp
sources/pdfencoding.cpp
sources/pdfcatalog.cpp
sources/pdfpage.cpp
sources/pdfstreamfilters.cpp
sources/pdfdrawspacecontroller.cpp
sources/pdfcolorspaces.cpp
sources/pdfrenderer.cpp
sources/pdfpagecontentprocessor.cpp
sources/pdfpainter.cpp
sources/pdffunction.cpp
sources/pdfnametounicode.cpp
sources/pdffont.cpp
sources/pdfimage.cpp
2023-02-19 18:36:46 +01:00
sources/pdfdocumentsanitizer.h
sources/pdfdocumentsanitizer.cpp
2023-11-17 13:45:49 +01:00
sources/pdfimageconversion.h
sources/pdfimageconversion.cpp
sources/pdfcolorconvertor.h
sources/pdfcolorconvertor.cpp
2022-08-14 17:50:52 +02:00
cmaps.qrc
)
include(GenerateExportHeader)
2023-12-03 19:11:17 +01:00
GENERATE_EXPORT_HEADER(Pdf4QtLibCore
EXPORT_MACRO_NAME
2023-12-04 20:04:40 +01:00
PDF4QTLIBCORESHARED_EXPORT
2023-12-03 19:11:17 +01:00
EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/${INSTALL_INCLUDEDIR}/pdf4qtlibcore_export.h")
2023-12-03 19:11:17 +01:00
target_link_libraries(Pdf4QtLibCore PRIVATE Qt6::Core Qt6::Gui Qt6::Xml Qt6::Svg)
target_link_libraries(Pdf4QtLibCore PRIVATE lcms2::lcms2)
target_link_libraries(Pdf4QtLibCore PRIVATE OpenSSL::SSL OpenSSL::Crypto)
target_link_libraries(Pdf4QtLibCore PRIVATE ZLIB::ZLIB)
target_link_libraries(Pdf4QtLibCore PRIVATE freetype)
target_link_libraries(Pdf4QtLibCore PRIVATE openjp2)
target_link_libraries(Pdf4QtLibCore PRIVATE JPEG::JPEG)
2023-12-04 20:04:40 +01:00
if(PDF4QT_ENABLE_OPENGL)
target_link_libraries(Pdf4QtLibCore PRIVATE Qt6::OpenGL)
endif()
2022-09-18 13:08:21 +02:00
if(LINUX_GCC)
2023-12-03 19:11:17 +01:00
target_link_libraries(Pdf4QtLibCore PUBLIC TBB::tbb)
2022-09-18 13:08:21 +02:00
endif()
2022-09-11 17:54:11 +02:00
if(MINGW)
2023-12-03 19:11:17 +01:00
target_link_libraries(Pdf4QtLibCore PRIVATE Secur32 Mscms Gdi32 User32 crypt32)
2022-09-11 17:54:11 +02:00
endif()
2023-12-03 19:11:17 +01:00
target_include_directories(Pdf4QtLibCore INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/sources)
target_include_directories(Pdf4QtLibCore PUBLIC ${CMAKE_BINARY_DIR}/${INSTALL_INCLUDEDIR})
2023-12-03 19:11:17 +01:00
set_target_properties(Pdf4QtLibCore PROPERTIES
VERSION ${PDF4QT_VERSION}
2023-09-23 18:07:38 +02:00
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_INSTALL_LIB_DIR}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_INSTALL_BIN_DIR})
2023-12-03 19:11:17 +01:00
install(TARGETS Pdf4QtLibCore RUNTIME DESTINATION ${PDF4QT_INSTALL_BIN_DIR} LIBRARY DESTINATION ${PDF4QT_INSTALL_LIB_DIR})