summaryrefslogtreecommitdiff
path: root/doc/src/platforms/macos-deploy-cmake.qdocinc
blob: a020244c71ca17ecb9dcc4afac24360275da1e81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

//! [building with cmake]
    Go into the directory that contains the application:

    \snippet snippets/code/doc_src_deployment.qdoc 28

    Next, set the \c CMAKE_PREFIX_PATH variable to point to your
    installation prefix. If you have a Cmake build already, delete the
    \c CMakeCache.txt file. Then, rerun CMake:

    \badcode \QtVersion
    cmake -DCMAKE_PREFIX_PATH=path/to/Qt/\1/your_platform -S <source-dir> -B <build-dir> -G Ninja
    \endcode

    Alternatively, use the convenience script \c qt-cmake, which sets the
    \c CMAKE_PREFIX_PATH variable for you.

    \badcode
    path/to/Qt/\1/your_platform/bin/qt-cmake -S <source-dir> -B <build-dir> -G Ninja
    \endcode

    Finally, go into your build directory and run your preferred build system.
    In this example, we're using \c Ninja.

    \badcode
    cd path/to/build/dir
    ninja
    \endcode

    Now, provided that everything compiled and linked without any errors, you
    should have a \c plugandpaint.app bundle ready for deployment. Try
    installing the bundle on a machine running \macos that does not have Qt or
    any Qt applications installed.
//! [building with cmake]