// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page creator-build-settings-qmake.html
    \previouspage creator-reference.html
    \nextpage creator-running-targets.html

    \title Building projects with qmake

    \quotation
    \l {Build with qmake}{How to: Build with qmake}
    \endquotation

    \brief Settings for building applications with qmake.

    To specify build settings for the selected \l{Managing kits}{kit}, go to
    \uicontrol Projects > \uicontrol {Build Settings}.

    \image {qtcreator-projectpane.webp} {qmake build settings}

    \section1 Build directory

    By default, \QC builds qmake projects (that have \c .pro files) in a separate
    directory from the source directory, as \l{glossary-shadow-build}
    {shadow builds}. This keeps the files generated for each kit separate. If
    you only build and run with a single kit, you can clear the
    \uicontrol {Shadow build} checkbox.

    Select the build directory in \uicontrol {Build directory}. You
    can use the \l{Use \QC variables}{variables} that are listed when
    you select \inlineimage {icons/replace.png} {Variables} (\uicontrol {Variables}).

    To make in-source builds the default option for all projects:

    \list 1
        \li Go to \preferences > \uicontrol {Build & Run} >
            \uicontrol {Default Build Properties}.
        \li In \uicontrol {Default build directory}, enter a period (.)
    \endlist

    \section1 Tooltips in kit selector

    In \uicontrol {Tooltip in target selector}, enter text
    to show as a tooltip when you hover over the build
    configuration in the \l{Build for many platforms}{kit selector}.

    You can create separate versions of project files to keep platform-dependent
    code separate. You can use qmake \l{Adding Platform Specific Source Files}
    {scopes} to select the file to process depending on which platform qmake is
    run on.

//! [qmake-qbs-common-settings]

    \section1 Separating debug info

    If debug info is being generated, you can have it placed into separate
    files, rather than embedded into the binary, by selecting
    \uicontrol Enable in \uicontrol {Separate debug info}. For
    more information, see \l{Analyze CPU usage}. To use default
    settings, select \uicontrol {Default}.

    \section1 Compiling QML

    You can compile QML source code into the final binary to improve the
    startup time of the application and eliminate the need to deploy QML
    files together with the application. For more information, see
    \l{Ahead-of-Time Compilation}.

    \QC project wizard templates create Qt Quick projects that can be compiled
    because they are set up to use the Qt Resource System. To compile QML code,
    select \uicontrol Enable in \uicontrol {Qt Quick Compiler}. To
    use default settings, select \uicontrol {Default}.
//! [qmake-qbs-common-settings]

    \section1 Parsing project contents

    In \uicontrol {qmake system() behavior when parsing},
    select whether processes are run via qmake's \c system() function or
    ignored. Setting this option to \uicontrol Ignore might help if opening
    or closing projects takes too long, but it might produce inexact parsing
    results.

    \section1 Global qmake settings

    To specify settings for all qmake builds, go to \preferences >
    \uicontrol {Build & Run} > \uicontrol Qmake.

    \image {qtcreator-preferences-build-run-qmake.png} {Qmake tab in Build & Run preferences}

    To set the default build properties,  \preferences >
    \uicontrol {Build & Run} > \uicontrol {Default Build Properties}.

    \image {qtcreator-build-settings-default.webp} {Default Build Properties tab in Build & Run preferences}

    \section1 qmake build steps

    \QC builds qmake projects by running the \c make or \c nmake command from
    the Qt version defined for the current build configuration.

    \image qtcreator-build-steps.png {qmake build steps}

    To override the shell command that \QC constructs by default, disable or
    remove the build step and add a custom build step that specifies another
    shell command.

    By default, \QC uses all the CPU cores available to achieve maximum build
    parallelization. On Linux and \macos, you can specify the number of parallel
    jobs to use for building in \uicontrol {Parallel jobs}. Select
    \uicontrol {Override MAKEFLAGS} to override existing MAKEFLAGS
    variables.

    Select \uicontrol {Disable in subdirectories} to execute the build step
    only for a top-level build.

    Select \uicontrol {Add Build Step} > \uicontrol {IncrediBuild for Linux} or
    \uicontrol {IncrediBuild for Windows} to accelerate builds by using
    \l{IncrediBuild Build Configuration}{IncrediBuild}.

    Select \uicontrol {Add Build Step} > \uicontrol {Run Conan Install} to use
    the \l{Conan Build Configuration}{Conan} package manager with qmake

    \sa {Build with qmake}{How to: Build with qmake},
    {Activate kits for a project}, {Configure projects for building},
    {Configure projects for running}, {Open projects},
    {Set the default build and run directories}, {Setting up QML debugging}
*/
