diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-05-19 09:42:44 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-05-25 11:31:06 +0000 |
commit | b3ffd8d1ebe2cfd3f84bfd3d9e926e1a291ffbf6 (patch) | |
tree | 130ec7c816b88b510ea7bacfbf9ecce6a9dba8b4 /scripts | |
parent | 52188918c0d4c90c38be99eb2c4586dd3a11b67f (diff) |
CMake build: Move documentation functions to re-usable location
Removes "install_..._docs" and "clean_docs" special targets.
Instead install documentation with "--install . --component qch_docs"
and "--install . --component html_docs" which have the advantage that
the install prefix can be specified later on with --prefix.
Also removes export of IDE_SOURCE_DIR, which is not used.
Change-Id: I4fce0b9aa8c7fc40b7e94e065777ddf4c0b76c41
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.py | 11 | ||||
-rwxr-xr-x | scripts/build_plugin.py | 14 |
2 files changed, 17 insertions, 8 deletions
diff --git a/scripts/build.py b/scripts/build.py index e7e414f508..4547bf647c 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -153,17 +153,12 @@ def build_qtcreator(args, paths): paths.build) if not args.no_docs: common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, - '--component', 'qtc_docs_qtcreator'], + '--component', 'qch_docs'], paths.build) common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, - '--component', 'html_docs_qtcreator'], - paths.build) - common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, - '--component', 'html_docs_qtcreator-dev'], - paths.build) - common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, - '--component', 'html_docs_qtcreator-dev'], + '--component', 'html_docs'], paths.build) + def build_wininterrupt(args, paths): if not common.is_windows_platform(): return diff --git a/scripts/build_plugin.py b/scripts/build_plugin.py index 97c4829745..9df8c64f74 100755 --- a/scripts/build_plugin.py +++ b/scripts/build_plugin.py @@ -51,6 +51,8 @@ def get_arguments(): parser.add_argument('--add-config', help=('Adds the argument to the CMake configuration call. ' 'Use "--add-config=-DSOMEVAR=SOMEVALUE" if the argument begins with a dash.'), action='append', dest='config_args', default=[]) + parser.add_argument('--with-docs', help='Build and install documentation.', + action='store_true', default=False) parser.add_argument('--deploy', help='Installs the "Dependencies" component of the plugin.', action='store_true', default=False) parser.add_argument('--debug', help='Enable debug builds', action='store_true', default=False) @@ -79,6 +81,9 @@ def build(args, paths): # TODO this works around a CMake bug https://gitlab.kitware.com/cmake/cmake/issues/20119 cmake_args += ['-DBUILD_WITH_PCH=OFF'] + if args.with_docs: + cmake_args += ['-DWITH_DOCS=ON'] + ide_revision = common.get_commit_SHA(paths.src) if ide_revision: cmake_args += ['-DQTC_PLUGIN_REVISION=' + ide_revision] @@ -88,8 +93,17 @@ def build(args, paths): cmake_args += args.config_args common.check_print_call(cmake_args + [paths.src], paths.build) common.check_print_call(['cmake', '--build', '.'], paths.build) + if args.with_docs: + common.check_print_call(['cmake', '--build', '.', '--target', 'docs'], paths.build) common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, '--strip'], paths.build) + if args.with_docs: + common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, + '--component', 'qch_docs'], + paths.build) + common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, + '--component', 'html_docs'], + paths.build) if args.deploy: common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, '--component', 'Dependencies'], |