creator-projects-targets.qdoc 6.25 KB
Newer Older
Leena Miettinen's avatar
Leena Miettinen committed
1
2
/****************************************************************************
**
3
4
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
Leena Miettinen's avatar
Leena Miettinen committed
5
**
6
** This file is part of the Qt Creator documentation.
Leena Miettinen's avatar
Leena Miettinen committed
7
**
8
9
10
11
12
13
14
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
Leena Miettinen's avatar
Leena Miettinen committed
15
**
16
** GNU Free Documentation License Usage
Leena Miettinen's avatar
Leena Miettinen committed
17
18
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
19
20
21
22
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
Leena Miettinen's avatar
Leena Miettinen committed
23
24
25
26
27
28
29
30
31
32
**
****************************************************************************/

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!
33
    \contentspage {Qt Creator Manual}
34
    \previouspage creator-configuring-projects.html
Leena Miettinen's avatar
Leena Miettinen committed
35
36
37
    \page creator-targets.html
    \nextpage creator-project-qmake.html

38
    \title Adding Kits
Leena Miettinen's avatar
Leena Miettinen committed
39

40
41
42
    \QC groups settings used for building and running projects as kits
    to make cross-platform and cross-configuration
    development easier. Each kit consists of a set of values that define one
43
    environment, such as a device, compiler, Qt version, and debugger command
44
45
    to use, and some metadata, such as an icon and a name for the kit. Once
    you have defined kits, you can select them to build and run projects.
Leena Miettinen's avatar
Leena Miettinen committed
46
47
48
49
50
51

    \QC supports development for the desktop and for the following types of
    devices:

    \list

52
        \li Android Device
Leena Miettinen's avatar
Leena Miettinen committed
53

54
55
        \li Bare Metal Device

56
        \li Generic Linux Device
Leena Miettinen's avatar
Leena Miettinen committed
57

58
59
60
61
        \li iOS Device

        \li iOS Simulator

62
        \li QNX Device
Leena Miettinen's avatar
Leena Miettinen committed
63
64
65

    \endlist

66
    To add kits:
Leena Miettinen's avatar
Leena Miettinen committed
67
68
69

    \list 1

70
71
        \li Select \uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run}
            > \uicontrol Kits > \uicontrol Add.
Leena Miettinen's avatar
Leena Miettinen committed
72

73
            \image qtcreator-kits.png
Leena Miettinen's avatar
Leena Miettinen committed
74

75
            To clone the selected kit, select \uicontrol Clone.
Leena Miettinen's avatar
Leena Miettinen committed
76

77
        \li In the \uicontrol Name column, double-click the kit name to change it.
Leena Miettinen's avatar
Leena Miettinen committed
78

79
        \li In the \uicontrol{Device type} field, select the type of the device.
Leena Miettinen's avatar
Leena Miettinen committed
80
81

            Double-click the icon next to the field to select the image that is
82
            displayed in the kit selector for this kit. You can use any
Leena Miettinen's avatar
Leena Miettinen committed
83
84
85
            image in a supported file format (for example, PNG). The image is
            scaled to the size 64x64 pixels. For example, using the compiler
            logo as an icon allows you to easily see, which compiler is used to
86
            build the project for the selected kit.
Leena Miettinen's avatar
Leena Miettinen committed
87

88
        \li In the \uicontrol Device field, select a device.
Leena Miettinen's avatar
Leena Miettinen committed
89

90
        \li In the \uicontrol Sysroot field, specify the directory where the device
Leena Miettinen's avatar
Leena Miettinen committed
91
92
93
            image is located. If you are not cross-compiling, leave this field
            empty.

94
        \li In the \uicontrol {Compiler} field, select the compiler required
95
            to build the project. You can add compilers to the list
Leena Miettinen's avatar
Leena Miettinen committed
96
            if they are installed on the development PC, but were not detected
97
            automatically. For more information, see \l{Adding Compilers}.
Leena Miettinen's avatar
Leena Miettinen committed
98

99
        \li In the \uicontrol Environment field, select \uicontrol Change to modify
100
            environment variable values for build and run environments in
101
            the \uicontrol {Edit Environment Changes} dialog. For more information
102
103
            about how to add and remove variable values, see \l{Batch Editing}.

104
        \li In the \uicontrol Debugger field, select the debugger to debug the project
105
106
107
108
            on the target platform. \QC automatically detects available
            debuggers and displays a suitable debugger in the field. You can
            add debuggers to the list. For more information, see
            \l{Adding Debuggers}.
Leena Miettinen's avatar
Leena Miettinen committed
109

110
        \li In the \uicontrol {Qt version} field, select the Qt version to use for
Leena Miettinen's avatar
Leena Miettinen committed
111
112
113
114
115
116
            building the project. You can add Qt versions to the list if they
            are installed on the development PC, but were not detected
            automatically. For more information, see \l{Adding Qt Versions}.

            \QC checks the directories listed in the \c{PATH} environment
            variable for the qmake executable. If a qmake executable is found,
117
            it is referred to as \b{Qt in PATH} and selected as the Qt
118
            version to use for the \uicontrol Desktop kit that is created by default.
Leena Miettinen's avatar
Leena Miettinen committed
119

120
        \li In the \uicontrol {Qt mkspec} field, specify the name of the mkspec
121
122
            configuration that should be used by qmake. If you leave this field
            empty, the default mkspec of the selected Qt version is used.
Leena Miettinen's avatar
Leena Miettinen committed
123

124
125
126
127
128
        \li In the \uicontrol {CMake Tool} field, select the CMake tool to use
            for building the project. Select \uicontrol Manage to add installed
            CMake tools to the list. For more information, see
            \l{Adding CMake Tools}.

129
130
131
132
133
134
135
136
137
138
        \li In the \uicontrol {CMake Generator} field, select the CMake
            Generator to use for producing project files. Only the generators
            with names beginning with the string \uicontrol CodeBlocks produce
            all the necessary data for the \QC code model. \QC displays a
            warning if you select a generator that is not supported.

        \li In the \uicontrol {CMake configuration} field, select
            \uicontrol Change to edit the variables of the CMake configuration
            for the kit.

Leena Miettinen's avatar
Leena Miettinen committed
139
140
    \endlist

141
142
143
144
    \QC uses the \e {default kit} if it does not have enough information to
    choose the kit to use. To set the selected kit as the default kit,
    select \uicontrol {Make Default}.

Leena Miettinen's avatar
Leena Miettinen committed
145
*/