From 4b3a7463328b657650da873cd485bfd5ced9c247 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 23 Mar 2021 17:54:06 +0100 Subject: CMake build: Fix remaining issues with Devel package On Linux (and Windows) we should not create toplevel files (README.md etc) or directories (doc/, scripts/ etc). On macOS, move the whole Devel package contents into the app bundle, because that is installed toplevel in the Qt installers, and we shouldn't even create include/, lib/ or any other directory at the toplevel at all. Since the prefix path must now point to the Resources folder inside the app bundle, adapt build_plugin.py to also accept --qtc-path pointing to the app bundle (Qt Creator.app) itself, and also to the app bundles parent directory. Adapt the Qt Creator plugin project template similarly. Task-number: QTCREATORBUG-25414 Fixes: QTCREATORBUG-25415 Change-Id: Ic756237fb920b54b1ec95d076649ad947b39a7e8 Reviewed-by: Cristian Adam --- scripts/build_plugin.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/build_plugin.py') diff --git a/scripts/build_plugin.py b/scripts/build_plugin.py index 8ec5eb44641..c70d6051283 100755 --- a/scripts/build_plugin.py +++ b/scripts/build_plugin.py @@ -69,6 +69,14 @@ def build(args, paths): if not os.path.exists(paths.result): os.makedirs(paths.result) prefix_paths = [os.path.abspath(fp) for fp in args.prefix_paths] + [paths.qt_creator, paths.qt] + if common.is_mac_platform(): + # --qtc-path may be + # "/path/Qt Creator.app/Contents/Resources", + # "/path/Qt Creator.app", or + # "/path", + # so add some variants to the prefix path + prefix_paths += [os.path.join(paths.qt_creator, 'Contents', 'Resources'), + os.path.join(paths.qt_creator, 'Qt Creator.app', 'Contents', 'Resources')] prefix_paths = [common.to_posix_path(fp) for fp in prefix_paths] separate_debug_info_option = 'ON' if args.with_debug_info else 'OFF' cmake_args = ['cmake', -- cgit v1.2.3