summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-10-05 13:07:07 +0200
committerEike Ziller <eike.ziller@qt.io>2022-10-07 09:15:33 +0000
commitc72a9197a46695439ba4e59043d7d71993c477bc (patch)
treecaed97bef52dfae2506c3cd11e0162cae7464149 /cmake
parentfcb79ee8108e8332e92e53884320623c0d6d5a3e (diff)
downloadqt-creator-c72a9197a46695439ba4e59043d7d71993c477bc.tar.gz
build.py: Add option to call cpack
Adds --with-cpack option. - macOS: does nothing (we already create a better, signed disk image) - Linux: creates qtcreator.deb in build directory - Windows: Checks for NSIS and WIX installation, creates qtcreator.exe and qtcreator.msi as appropriate Change-Id: Ie7816d04cb2e01e90795481e1519b0a6645f5cd3 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Utils.cmake14
1 files changed, 10 insertions, 4 deletions
diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake
index 363c78ddaf..e43674e4a3 100644
--- a/cmake/Utils.cmake
+++ b/cmake/Utils.cmake
@@ -22,16 +22,22 @@ function(setup_dependencies_component)
set(_elfutils_arg "--elfutils \"${_elfutils_path}\"")
endif()
install(CODE "
- set(_ide_app_target \"\${CMAKE_INSTALL_PREFIX}/${IDE_APP_PATH}/${IDE_APP_TARGET}${CMAKE_EXECUTABLE_SUFFIX}\")
+ # DESTDIR is set for e.g. the cpack DEB generator, but is empty in other situations
+ if(DEFINED ENV{DESTDIR})
+ set(DESTDIR_WITH_SEP \"\$ENV{DESTDIR}/\")
+ else()
+ set(DESTDIR_WITH_SEP \"\")
+ endif()
+ set(_default_app_target \"\${DESTDIR_WITH_SEP}\${CMAKE_INSTALL_PREFIX}/${IDE_APP_PATH}/${IDE_APP_TARGET}${CMAKE_EXECUTABLE_SUFFIX}\")
+ set(_ide_app_target \"\${_default_app_target}\")
if (NOT EXISTS \"\${_ide_app_target}\")
# The component CPack generators (WIX, NSIS64, IFW) install every component with their own CMAKE_INSTALL_PREFIX
# directory and since deployqt.py needs the path to IDE_APP_TARGET the line below is needeed
string(REPLACE \"Dependencies\" \"${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}\" _ide_app_target \"\${_ide_app_target}\")
endif()
if (NOT EXISTS \"\${_ide_app_target}\")
- # On Linux with the DEB generator the CMAKE_INSTALL_PREFIX is relative and the DESTDIR environment variable is needed
- # to point out to the IDE_APP_TARGET binary
- set(_ide_app_target \"\$ENV{DESTDIR}/\${CMAKE_INSTALL_PREFIX}/${IDE_APP_PATH}/${IDE_APP_TARGET}${CMAKE_EXECUTABLE_SUFFIX}\")
+ # something went wrong, reset to default and hope for the best
+ set(_ide_app_target \"\${_default_app_target}\")
endif()
execute_process(COMMAND
\"${Python3_EXECUTABLE}\"