| 1 |
add_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS) |
| 2 |
|
| 3 |
include_directories( |
| 4 |
${CMAKE_CURRENT_SOURCE_DIR} |
| 5 |
${CMAKE_CURRENT_BINARY_DIR} |
| 6 |
) |
| 7 |
|
| 8 |
configure_file(poppler-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/poppler-version.h @ONLY) |
| 9 |
|
| 10 |
set(poppler_qt5_SRCS |
| 11 |
poppler-annotation.cc |
| 12 |
poppler-document.cc |
| 13 |
poppler-embeddedfile.cc |
| 14 |
poppler-fontinfo.cc |
| 15 |
poppler-form.cc |
| 16 |
poppler-link.cc |
| 17 |
poppler-link-extractor.cc |
| 18 |
poppler-movie.cc |
| 19 |
poppler-optcontent.cc |
| 20 |
poppler-page.cc |
| 21 |
poppler-base-converter.cc |
| 22 |
poppler-pdf-converter.cc |
| 23 |
poppler-private.cc |
| 24 |
poppler-ps-converter.cc |
| 25 |
poppler-qiodeviceinstream.cc |
| 26 |
poppler-qiodeviceoutstream.cc |
| 27 |
poppler-sound.cc |
| 28 |
poppler-textbox.cc |
| 29 |
poppler-page-transition.cc |
| 30 |
poppler-media.cc |
| 31 |
poppler-outline.cc |
| 32 |
QPainterOutputDev.cc |
| 33 |
poppler-version.cpp |
| 34 |
) |
| 35 |
add_library(poppler-qt5 ${poppler_qt5_SRCS}) |
| 36 |
generate_export_header(poppler-qt5 BASE_NAME poppler-qt5 EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/poppler-export.h") |
| 37 |
set_target_properties(poppler-qt5 PROPERTIES VERSION 1.40.0 SOVERSION 1) |
| 38 |
if(MINGW AND BUILD_SHARED_LIBS) |
| 39 |
get_target_property(POPPLER_QT5_SOVERSION poppler-qt5 SOVERSION) |
| 40 |
set_target_properties(poppler-qt5 PROPERTIES SUFFIX "-${POPPLER_QT5_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}") |
| 41 |
endif() |
| 42 |
target_link_libraries(poppler-qt5 poppler Qt5::Core Qt5::Gui Qt5::Xml Freetype::Freetype) |
| 43 |
if (ENABLE_NSS3) |
| 44 |
target_include_directories(poppler-qt5 SYSTEM PRIVATE ${NSS3_INCLUDE_DIRS}) |
| 45 |
endif() |
| 46 |
if(USE_CMS) |
| 47 |
target_link_libraries(poppler-qt5 poppler ${LCMS2_LIBRARIES}) |
| 48 |
target_include_directories(poppler-qt5 SYSTEM PRIVATE ${LCMS2_INCLUDE_DIR}) |
| 49 |
endif() |
| 50 |
install(TARGETS poppler-qt5 RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
| 51 |
|
| 52 |
set(poppler_qt5_all_install_headers |
| 53 |
poppler-qt5.h |
| 54 |
poppler-link.h |
| 55 |
poppler-annotation.h |
| 56 |
poppler-form.h |
| 57 |
poppler-optcontent.h |
| 58 |
poppler-page-transition.h |
| 59 |
poppler-media.h |
| 60 |
${CMAKE_CURRENT_BINARY_DIR}/poppler-export.h |
| 61 |
${CMAKE_CURRENT_BINARY_DIR}/poppler-version.h |
| 62 |
) |
| 63 |
if (${CMAKE_VERSION} VERSION_LESS "3.23.0") |
| 64 |
install(FILES ${poppler_qt5_all_install_headers} DESTINATION include/poppler/qt5) |
| 65 |
else() |
| 66 |
target_sources(poppler-qt5 |
| 67 |
PUBLIC |
| 68 |
FILE_SET HEADERS |
| 69 |
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR} |
| 70 |
FILES ${poppler_qt5_all_install_headers} |
| 71 |
) |
| 72 |
install(TARGETS poppler-qt5 FILE_SET HEADERS DESTINATION include/poppler/qt5) |
| 73 |
endif() |