summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-11-23 14:36:16 +0100
committerEike Ziller <eike.ziller@qt.io>2020-11-24 14:10:07 +0000
commitd04355dfb0aa444f5f6352d1b7126a0278807b78 (patch)
tree104af6b1ed6685eb1c11e99d0f66eab45eaf7417 /CMakeLists.txt
parent5cd057d9fe28a94b8d1aec1592c9c7d5ba7288f5 (diff)
downloadqt-creator-d04355dfb0aa444f5f6352d1b7126a0278807b78.tar.gz
cmake build: Re-add a "Dependencies" component that runs deploy script
And use that from the build script. Change-Id: I97d5b593cf703bb8e51556240f37c80aad654732 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 30 insertions, 0 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