From c435f8efa2e30016c58f150a1ebe1ca560bfd2dc Mon Sep 17 00:00:00 2001 From: Leena Miettinen <riitta-leena.miettinen@qt.io> Date: Mon, 27 Jan 2020 13:43:04 +0100 Subject: [PATCH] Doc: Add information about building the module with CMake Task-number: QTBUG-81560 Change-Id: I9d75606634da4c604f34913908f97a91797d1813 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> --- src/pdf/doc/qtpdf.qdocconf | 3 ++- src/pdf/doc/snippets/qtpdf-build.cmake | 2 ++ src/pdf/doc/src/qtpdf-index.qdoc | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/pdf/doc/snippets/qtpdf-build.cmake diff --git a/src/pdf/doc/qtpdf.qdocconf b/src/pdf/doc/qtpdf.qdocconf index 7f7a0e80b..7a77105c9 100644 --- a/src/pdf/doc/qtpdf.qdocconf +++ b/src/pdf/doc/qtpdf.qdocconf @@ -39,7 +39,8 @@ depends += qtcore \ qtdoc \ qmake \ qtdesigner \ - qtquick + qtquick \ + qtcmake headerdirs += ../api \ ../quick diff --git a/src/pdf/doc/snippets/qtpdf-build.cmake b/src/pdf/doc/snippets/qtpdf-build.cmake new file mode 100644 index 000000000..d46b9c3ee --- /dev/null +++ b/src/pdf/doc/snippets/qtpdf-build.cmake @@ -0,0 +1,2 @@ +find_package(Qt5 COMPONENTS Pdf REQUIRED) +target_link_libraries(mytarget Qt5::Pdf) diff --git a/src/pdf/doc/src/qtpdf-index.qdoc b/src/pdf/doc/src/qtpdf-index.qdoc index d50d1482c..b32787eb5 100644 --- a/src/pdf/doc/src/qtpdf-index.qdoc +++ b/src/pdf/doc/src/qtpdf-index.qdoc @@ -39,7 +39,12 @@ \l QPdfPageNavigation class handles the navigation through a PDF document. - \section1 Getting Started + \include module-use.qdocinc using qt module + \quotefile qtpdf-build.cmake + + See also the \l{Build with CMake} overview. + + \section2 Building with qmake To include the definitions of the module's classes, use the following directive: -- GitLab