summaryrefslogtreecommitdiffstats
path: root/cmake/QtDocsHelpers.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Skip 'qt5/' part in 3rd party documentationKai Köhne2022-06-231-0/+1
| | | | | | | | Pick-to: 6.4 Fixes: QTBUG-104463 Change-Id: I7596118e147c9b5b12b49c4cf2692626697f309e Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Assume qhelpgenerator in libexec instead of binJoerg Bornemann2021-11-081-1/+1
| | | | | | Task-number: QTBUG-88791 Change-Id: I0f6dc14401e715a98322abc21da3f88e34118e27 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* CMake: QtDocsHelpers: Rename generate_qdocs_args variableTopi Reinio2021-11-031-2/+2
| | | | | | | | | To be consistent with prepare_qdoc_args. Pick-to: 6.2 Change-Id: Ibd40d6c26f6f6fa49ea78b6476f396153b7c4ee5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Introduce QT_BUILD_ONLINE_DOCS flag for documentation buildsTopi Reinio2021-09-301-2/+10
| | | | | | | | | | | | | | | | | QDoc modifies its linking behavior depending on whether the -installdir command line option was set or not; Without -installdir, QDoc will use 'https://<url>' to link to targets loaded from external documentation modules, instead of using relative paths. Drop the -installdir if QT_BUILD_ONLINE_DOCS was set. This behavior matches the 'build_online_docs' scope that was used for qmake documentation targets, and is useful for documentation projects that are not part of Qt but want to link to Qt docs simply by loading the index files of Qt's modules. Pick-to: 6.2 Change-Id: Ib1bbf7b9d784e0c276d2bc520240af4a6c8ba903 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix location of qtattributionsscanner in doc buildsKai Köhne2021-06-031-6/+9
| | | | | | | | qtattributionsscanner is now found in libexec. Task-number: QTBUG-88791 Change-Id: Ie704663012be92b0c223d9d57210ec1874abff0b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make a documentation-only build possibleJoerg Bornemann2021-04-291-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Packagers usually build Qt per repo, but the documentation must be built from the full Qt source archive to ensure that inter-repo links are set up correctly. When building the documentation, it's desirable to avoid building tools and re-use to tools of an existing Qt build. One now can do a documentation-only build by configuring Qt like this: cmake /path/to/Qt/source -GNinja \ -DQT_HOST_PATH=/path/to/Qt/installation and build the documentation with ninja docs To avoid building tools, this patch removes the DEPENDS arguments from some add_custom_target calls in QtDocsHelpers.cmake and makes another one conditional. The removed dependencies are added at the end of qt_internal_add_docs. Adding of tool dependencies is not done if QT_HOST_PATH is set. Fixes: QTBUG-88441 Change-Id: I3b7a908e22d252d2edcdc1dd522a78b8ad6c487e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove redundant .qch from installed docsAlexey Edelev2021-01-081-1/+3
| | | | | | | | | | Use upper-level document build directory for generated .qch files. This avoids copying of .qch with html documents and duplicating them in the installation directory. Pick-to: 6.0 Change-Id: I63b2de0047005419d352ea259dec6f17a826a477 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix qch install pathAlexey Edelev2021-01-071-1/+1
| | | | | | | | | Exclude qch_file_name from install DESTINATION Fixes: QTBUG-89769 Pick-to: 6.0 Change-Id: I8dba13a0a2c2c92d6b2d6aa438c295b42a04156b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Handle empty INCLUDE_DIRECTORIES in genex for qdocCraig Scott2020-11-301-1/+1
| | | | | | | | | | | | | | | Follow the pattern recommended in the CMake docs for the $<JOIN:...> generator expression. Wrap it in a $<BOOL:...> genex so that if a target's INCLUDE_DIRECTORIES property is empty, we don't add a stray -I with no directory following it. This fixes the following error when running qdoc: qdoc: Missing value after '-I'. Pick-to: 6.0 Task-number: QTBUG-88838 Change-Id: Ie3ef2625fbb29cc501f7fc22ff7a9cc8ac548322 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow generating documentation for INTERFACE targetsAlexandru Croitor2020-11-251-2/+9
| | | | | | | | | | | | Query the include dirs from the INTERFACE_INCLUDE_DIRECTORIES property when generating docs for an INTERFACE library. Amends 2db41fefa006c9aabd577eee98b8a9594d264470 Pick-to: 6.0 Task-number: QTBUG-88838 Change-Id: Ic8a454ba66b2dbc59bad883e1e0d38ebb26d0370 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Allow using DESTDIR when installing documentationChristophe Giboudeaux2020-11-101-7/+20
| | | | | | | | | | | | | | Previously, QtDocsHelpers.cmake was invoking CMake to copy files or directories instead of using installation targets. This resulted in DESTDIR being ignored. Now we create installation targets and ask CMake to install them. Change-Id: Idbc79d47a37f9ca865d28543bdbbdde3ba448fa3 Fixes: QTBUG-87382 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow using a custom target for qt_internal_add_docsAlexandru Croitor2020-11-071-1/+1
| | | | | | | | | | | Some repos (like qtimageformats) might not have Qt modules, but they still need a target to pass to qt_internal_add_docs(). Allow passing custom targets to qt_internal_add_docs() without trying to generate bogus include paths. Change-Id: I12191e5b16c082e62e40c96d0eb4d6c0256e7ea4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Disconnect docs installation targets from generation targetsJoerg Bornemann2020-11-061-3/+0
| | | | | | | | | | | | | | | | | "ninja install_docs" should not run the "docs" target, because with the usual workflow ninja docs ninja install_docs the documentation would be built twice. That of course means that "ninja install_docs" will fail if "ninja docs" wasn't run before. Analogous for html_docs, qch_docs, the repository-level and module-level documentation targets. Change-Id: I8ad83602dd393b5afc79a19ab3d395987c889d0d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix top-level documentation install targetsJoerg Bornemann2020-11-061-0/+2
| | | | | | | | | | | | | | | | | | | | | The following targets did not do any actual installation: install_docs, install_html_docs, install_qch_docs, plus their repository-level counterparts. Add the following dependencies: install_html_docs --> install_html_docs_<repo> --> install_html_docs_<module> Analogous for qch. The install_docs target already triggers install_html_docs and install_qch_docs. Analogous for install_docs_<repo>. Fixes: QTBUG-86738 Change-Id: I3468e000e050e2787a859e61d40161f5459cb351 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix qdoc builds for non-top-level developer buildsKai Koehne2020-10-281-3/+1
| | | | | | | | Fixes a regression introduced in commit 748b3b9c8971e35 for builds that are both not a QT_SUPERBUILD and not QT_WILL_INSTALL. Change-Id: I52b920176a2696fa6206b89b2b69ae1a7f3fbc25 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Re-work documentation targetsJoerg Bornemann2020-10-281-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The top-level prepare_docs target is supposed to run before the generate_docs target. The repository-level targets like prepare_docs_qtbase now also run before their respective generate targets. To achieve that, several intermediate targets had to be introduced. The dependencies for top-level generate_docs look like this: /--> generate_top_level_docs_Core --\ generate_docs ---> generate_top_level_docs_Gui -----> prepare_docs \--> ... --/ The dependencies for repo-level generate_docs_<repo> look like this: /--> generate_repo_docs_Core generate_docs_qtbase ---> generate_repo_docs_Gui \--> ... generate_repo_docs_Core --\ generate_repo_docs_Gui -----> prepare_docs_qtbase ... --/ Analoguous for qch_docs. And last but not least, the module-level generate_docs_<module> depends on prepare_docs_<module>, just like before. The strangely named top-level install targets have been renamed to install_html_docs, install_qch_docs and install_docs. The html_docs target is now merely an alias for generate_docs. Apart from prepare_docs, the top-level targets do not depend on the repository-level targets anymore. Targets that are just an alias (docs, install_docs, ...) have been re-defined to depend just on the respective top-level targets. Fixes: QTBUG-87758 Change-Id: I24466d3a252d518a30a2064bf876be881c46231f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Don't invoke QDoc excessivelyTopi Reinio2020-10-241-16/+2
| | | | | | | | | | | | | | | The html_docs target does not need to call QDoc a third time as both its dependencies already do that. With qmake, html_docs did invoke QDoc if CONFIG did not include 'prepare_docs', but none of the Qt modules used that configuration. We can manage without it for now. Fixes: QTBUG-87751 Change-Id: I45d2d06006c566c431ae41d7f3a06d6b809987f2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Let doc targets depend on doc tools in top-level buildJoerg Bornemann2020-10-231-0/+21
| | | | | | | | | | | | | | | For top-level builds it's desirable to have "ninja generate_docs" build all tools needed to generate the documentation. This is problematic since the doc-generating targets are created before the doc tool targets. Thus, we must defer the dependency connection if the doc tool target is not yet available. This patch adds the functions qt_internal_defer_dependency and qt_internal_add_deferred_dependencies. Change-Id: Ica940b80882e67cb0e0943e95541f7f4d1885948 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix typo in variable nameJoerg Bornemann2020-10-231-3/+2
| | | | | Change-Id: I310ff17c75970482803294bb5f4473bcaebdc151 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Allow docs generation without installing in top-level buildsJoerg Bornemann2020-10-231-2/+6
| | | | | | | | | | | | | | This patch allows in top-level prefix builds to build Qt and to generate the documentation without running cmake --install first. For top-level builds we now always use the qdoc binary from the build directory, not the installation directory. We also have to copy the global doc files to the build directory to make them accessible to the generate_docs target. Change-Id: I2251603418fc3df9a21c7f2892789e9ff6c8cc21 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix html_docs targets for top-level buildsJoerg Bornemann2020-10-191-6/+1
| | | | | | | | | | | Do not append "/qtbase" to QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX when doing a top-level build. The "/qtbase" suffix is already part of this variable's content. Fixes: QTBUG-87682 Change-Id: If1c2075dc58d4b07a4c3a1eed12cc3336c5dc8e6 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Rename internal functions to contain qt_internalAlexandru Croitor2020-09-231-1/+1
| | | | | | | | | | Offer compatibility wrapper functions until we update all of the Qt repos to use the new names. Task-number: QTBUG-86815 Change-Id: I5826a4116f52a8509db32601ef7c200f9bd331de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* cmake: Fix generation of third-party attributesKai Koehne2020-08-261-1/+1
| | | | | | | Fix name of target so that qtattributionsscanner actually generates content. Change-Id: Ie42067928d7cd1de02fa4ae92a0f5ef54bd54a5c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* cmake: Fix building documentation on WindowsKai Koehne2020-08-261-6/+6
| | | | | | | Make sure the executable path contains an .exe on Windows. Change-Id: I972a3aaf1ad0510525ebfcc84e8c589f555c6d00 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Split QtBuild.cmake into smaller filesAlexandru Croitor2020-08-141-0/+198
QtBuild.cmake is huge. Split it. Move module, plugin, tools, executables and test related functions out of QtBuild.cmake into separate files. Do the same for many other things too. An additional requirement is that all the new Helpers files only define functions and macros. No global variable definitions are allowed, nor execution of commands with side effects. Some notes: qt_install_qml_files is removed because it's dead code. Some functions still need to be figured out, because they are interspersed and depend on various global state assignments. Task-number: QTBUG-86035 Change-Id: I21d79ff02eef923c202eb1000422888727cb0e2c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>