summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt30
-rwxr-xr-xscripts/build.py15
2 files changed, 33 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4de127c8a6..80ad5f44fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,6 +107,36 @@ endif()
add_subdirectory(doc)
+find_package(PythonInterp)
+if (NOT PYTHONINTERP_FOUND)
+ message("No python interpreter found, skipping \"Dependencies\" install component.")
+else()
+ get_target_property(_qmake_binary Qt5::qmake IMPORTED_LOCATION)
+ set(_llvm_arg)
+ if (LLVM_INSTALL_PREFIX)
+ set(_llvm_arg "--llvm \"${LLVM_INSTALL_PREFIX}\"")
+ endif()
+ set(_elfutils_arg)
+ if (ELFUTILS_INCLUDE_DIR)
+ get_filename_component(_elfutils_path ${ELFUTILS_INCLUDE_DIR} DIRECTORY)
+ set(_elfutils_arg "--elfutils \"${_elfutils_path}\"")
+ endif()
+ install(CODE "
+ execute_process(COMMAND
+ \"${PYTHON_EXECUTABLE}\"
+ \"${CMAKE_CURRENT_LIST_DIR}/scripts/deployqt.py\"
+ ${_llvm_arg}
+ ${_elfutils_arg}
+ \"\${CMAKE_INSTALL_PREFIX}/${IDE_APP_PATH}/${IDE_APP_TARGET}\"
+ \"${_qmake_binary}\"
+ COMMAND_ECHO STDOUT
+ )
+ "
+ COMPONENT Dependencies
+ EXCLUDE_FROM_ALL
+ )
+endif()
+
feature_summary(INCLUDE_QUIET_PACKAGES WHAT
PACKAGES_FOUND PACKAGES_NOT_FOUND
ENABLED_FEATURES DISABLED_FEATURES
diff --git a/scripts/build.py b/scripts/build.py
index c9a6a2ce1b..c4b2e36cc7 100755
--- a/scripts/build.py
+++ b/scripts/build.py
@@ -174,6 +174,9 @@ def build_qtcreator(args, paths):
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install, '--strip'],
paths.build)
+ common.check_print_call(['cmake', '--install', '.', '--prefix', paths.install,
+ '--component', 'Dependencies'],
+ paths.build)
common.check_print_call(['cmake', '--install', '.', '--prefix', paths.dev_install,
'--component', 'Devel'],
paths.build)
@@ -215,17 +218,6 @@ def build_qtcreatorcdbext(args, paths):
'--component', 'qtcreatorcdbext'],
paths.build)
-def deploy_qt(args, paths):
- cmd_args = ['python', '-u', os.path.join(paths.src, 'scripts', 'deployqt.py'), '-i']
- if paths.elfutils:
- cmd_args.extend(['--elfutils-path', paths.elfutils])
- if paths.llvm:
- cmd_args.extend(['--llvm-path', paths.llvm])
- app = (os.path.join(paths.install, args.app_target) if common.is_mac_platform()
- else os.path.join(paths.install, 'bin', args.app_target))
- common.check_print_call(cmd_args + [app, os.path.join(paths.qt, 'bin', 'qmake')],
- paths.build)
-
def package_qtcreator(args, paths):
if not args.no_zip:
common.check_print_call(['7z', 'a', '-mmt2',
@@ -291,7 +283,6 @@ def main():
build_qtcreator(args, paths)
build_wininterrupt(args, paths)
build_qtcreatorcdbext(args, paths)
- deploy_qt(args, paths)
package_qtcreator(args, paths)
if __name__ == '__main__':