
Please report any issues you find while playing with this at our bug tracker. The relocatable installation folder can be conveniently wrapped into a package using tools like cpack.

These are the platforms that are covered by Qt's CMake deployment API:įor Android and iOS there's still the need to call androiddeployqt / macdeployqt manually - or you let Qt Creator handle these details. The current solution wholly relies on CMake's built-in functionality. After installing CMake you should see cmake and cmake-gui executable files under CMake installation folder such as C:Program FilesCMakebin. The first step is to download the latest version (assuming versions in the future work in a similar way) from probably using this link.
#Installing cmake linux machine how to
We have seen how to deploy a simple Qt application on Linux using Qt 6.5's CMake deployment API. Step 1: Installing GLFW 3 on your system with CMAKE For this install, I was using KUbuntu 13.04, 64bit. You can inspect the content of the package with The package has been wrapped and is ready to be shipped.

Re-configure the project and run cpack: $ cpack -G DEBĬPack: - package: /home/someone/projects/myapp/build/my_ generated. Set(CPACK_DEBIAN_PACKAGE_DEPENDS libc6 libstdc++6 libgcc-s1) In standard Unix environment, a file for the platform of Linux x8664 will be. Set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Manfred Maintainer ") If CMake is installed on your system, the version number will be shown. Set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/myapp") Our goal is to have a (mostly) self-contained directory after installation.
#Installing cmake linux machine install
Now, we install the application and enhance the installation step. Target_link_libraries(MyApp PRIVATE Qt::Widgets)

cmake_minimum_required(VERSION 3.22)įind_package(Qt6 REQUIRED COMPONENTS Widgets) Quick recap how it looks like to deploy a simple Qt application. But not anymore: Qt 6.5 comes with deployment support for Linux! At the time of writing, Linux was not supported yet. You can use either the CMake command-line tool or the CMake GUI to generate. A while ago, I blogged about our CMake deployment API that allows you to enhance the cmake -install step with instructions that deploy Qt libraries, plugins and assets. Run CMake to generate the build files for a native build system, like Make or Ninja.
