summaryrefslogtreecommitdiffstats
path: root/cmake/QtDocsHelpers.cmake
Commit message (Collapse)AuthorAgeFilesLines
* 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>