diff options
Diffstat (limited to 'doc/reference/modules')
-rw-r--r-- | doc/reference/modules/capnprotocpp-module.qdoc | 4 | ||||
-rw-r--r-- | doc/reference/modules/cpp-module.qdoc | 5 | ||||
-rw-r--r-- | doc/reference/modules/exporter-cmake.qdoc | 135 | ||||
-rw-r--r-- | doc/reference/modules/flatbuf-c-module.qdoc | 83 | ||||
-rw-r--r-- | doc/reference/modules/flatbuf-cpp-module.qdoc | 144 | ||||
-rw-r--r-- | doc/reference/modules/protobufcpp-module.qdoc | 43 | ||||
-rw-r--r-- | doc/reference/modules/qt-core-module.qdoc | 50 |
7 files changed, 423 insertions, 41 deletions
diff --git a/doc/reference/modules/capnprotocpp-module.qdoc b/doc/reference/modules/capnprotocpp-module.qdoc index c3c8660c9..7635edd9e 100644 --- a/doc/reference/modules/capnprotocpp-module.qdoc +++ b/doc/reference/modules/capnprotocpp-module.qdoc @@ -104,12 +104,10 @@ /*! \qmlproperty string capnproto.cpp::outputDir - \readonly The directory where the \c capnpc compiler generated files are placed. - The value of this property is automatically set by \QBS and cannot be - changed by the user. + \defaultvalue \c product.buildDirectory + "/capnp" */ /*! diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc index f0b6de063..2b344aac2 100644 --- a/doc/reference/modules/cpp-module.qdoc +++ b/doc/reference/modules/cpp-module.qdoc @@ -80,6 +80,7 @@ May contain the values: "weak", "lazy", "reexport", and "upward"; refer to the Apple ld64 man page for full details. \c{undefined} uses normal linking. Currently only applies when linking for Apple platforms. + Note that \c "lazy" mode is deprecated and doesn't work with Xcode 15 and above. \endtable \section2 Relevant File Tags @@ -1402,8 +1403,8 @@ will result in the \c {-fuse-ld} option being emitted when linking with \c gcc, \c clang or \c clang-cl. Other toolchains do not support this property. - The possible values for \c clang and \c gcc are \c "bfd", \c "gold" and \c "lld", - the possible values for \c clang-cl are \c "link" and \c "lld". + The possible values for \c clang and \c gcc are \c "bfd", \c "gold", \c "lld" + and \c "mold", the possible values for \c clang-cl are \c "link" and \c "lld". The following example demonstrates how to change the linker for different toolchains: diff --git a/doc/reference/modules/exporter-cmake.qdoc b/doc/reference/modules/exporter-cmake.qdoc new file mode 100644 index 000000000..2f4191a76 --- /dev/null +++ b/doc/reference/modules/exporter-cmake.qdoc @@ -0,0 +1,135 @@ +/**************************************************************************** +** +** Copyright (C) 2024 Raphael Cotty (raphael.cotty@gmail.com) +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $QT_BEGIN_LICENSE:LGPL$ +** 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. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype Exporter.cmake + \inqmlmodule QbsModules + \since Qbs 2.3 + + \brief Provides support for generating \CMAKE packages from dynamic, static and header library + products. + + The Exporter.cmake module contains the properties and rules to create a \CMAKE config + \l{https://cmake.org/cmake/help/v3.29/manual/cmake-packages.7.html#config-file-packages}{files} + from the \l Export item of a \l Product. + + For instance, suppose you are creating a library. To allow exporting to \CMAKE, you would write + something like the following: + \code + DynamicLibrary { + name: "mylibrary" + qbs.installPrefix: "/opt/mylibrary" + Depends { name: "Exporter.cmake" } + Exporter.cmake.packageName: "MyLibrary" + property string headersInstallDir: "include" + // ... + Group { + name: "API headers" + files: ["mylib.h"] + qbs.install: true + qbs.installDir: headersInstallDir + } + Group { + fileTagsFilter: ["Exporter.cmake.package"] + qbs.installDir: "lib/cmake/MyLibrary" + } + Export { + Depends { name: "cpp" } + cpp.includePaths: FileInfo.joinPaths( + exportingProduct.qbs.installRoot, + exportingProduct.qbs.installPrefix, + exportingProduct.headersInstallDir) + } + } + \endcode + To build against this library, from within your \CMAKE project, you simply + use \l{https://cmake.org/cmake/help/v3.29/command/find_package.html}{find_package}: + \code + find_package(MyLibrary PATHS REQUIRED) + add_executable(Consumer main.cpp) + target_link_libraries(Consumer MyLibrary) + \endcode + + \section2 Relevant File Tags + \target filetags-exporter-qbs + + \table + \header + \li Tag + \li Since + \li Description + \row + \li \c{"Exporter.cmake.package"} + \li 2.3.0 + \li This tag is attached to all generated module files. + \row + \li \c{"Exporter.cmake.configFile"} + \li 2.3.0 + \li This tag is attached to the generated config file. + \row + \li \c{"Exporter.cmake.versionFile"} + \li 2.3.0 + \li This tag is attached to the generated version file. + \endtable +*/ + +/*! + \qmlproperty string Exporter.cmake::configFileName + + The name of the generated config file. + + \defaultvalue \c{packageName + "Config.cmake"} +*/ + +/*! + \qmlproperty string Exporter.cmake::versionFileName + + The name of the generated version file. + + \defaultvalue \c{packageName + "ConfigVersion.cmake"} +*/ + +/*! + \qmlproperty string Exporter.cmake::packageName + + The name of the \CMAKE package. + + \defaultvalue \l{Product::targetName}{Product.targetName} +*/ + diff --git a/doc/reference/modules/flatbuf-c-module.qdoc b/doc/reference/modules/flatbuf-c-module.qdoc new file mode 100644 index 000000000..d486ab3bf --- /dev/null +++ b/doc/reference/modules/flatbuf-c-module.qdoc @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2024 Ivan Komissarov (abbapoh@gmail.com) +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** 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. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype flatbuf.c + \inqmlmodule QbsModules + \since Qbs 2.4 + + \brief Provides support for \l{https://google.github.io/flatbuffers/}{FlatBuffers} for the + C language. + + The \c flatbuf.c module provides support for generating C headers + and sources from flatbuffers definition files using the \c flatcc tool. + + \section2 Relevant File Tags + + \table + \header + \li Tag + \li Auto-tagged File Names + \li Since + \li Description + \row + \li \c{"flatbuffers.input"} + \li \c{*.fbs} + \li 2.4.0 + \li Source files with this tag are considered inputs to the \c flatcc compiler. + \endtable + + \section2 Dependencies + This module depends on the \c flatcc module which can be created via the \l{conan}{Conan} + module provider. +*/ + +/*! + \qmlproperty string flatbuf.c::compilerName + + The name of the \c flatcc binary. + + \defaultvalue \c "flatcc" +*/ + +/*! + \qmlproperty string flatbuf.c::compilerPath + + The path to the \c flatcc binary. + + Use this property to override the auto-detected location. + + \defaultvalue \c auto-detected +*/ + +/*! + \qmlproperty pathList flatbuf.c::importPaths + + The list of import paths that are passed to the \c flatcc tool via the \c -I option. + + \defaultvalue \c [] +*/ diff --git a/doc/reference/modules/flatbuf-cpp-module.qdoc b/doc/reference/modules/flatbuf-cpp-module.qdoc new file mode 100644 index 000000000..a4b6915ab --- /dev/null +++ b/doc/reference/modules/flatbuf-cpp-module.qdoc @@ -0,0 +1,144 @@ +/**************************************************************************** +** +** Copyright (C) 2024 Ivan Komissarov (abbapoh@gmail.com) +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** 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. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmltype flatbuf.cpp + \inqmlmodule QbsModules + \since Qbs 2.4 + + \brief Provides support for \l{https://google.github.io/flatbuf/}{flatbuf} for the + C++ language. + + The \c flatbuf.cpp module provides support for generating C++ headers + and sources from flatbuf definition files using the \c flatc tool. + + A simple qbs file that uses flatbuf can be written as follows: + \code + CppApplication { + Depends { name: "flatbuf.cpp" } + files: ["foo.fbs", "main.cpp"] + } + \endcode + A generated header now can be included in the C++ sources: + \code + #include <foo_generated.h> + + int main(int argc, char* argv[]) { + flatbuf::FlatBufferBuilder builder; + + auto foo = QbsTest::CreateFoo(builder, 42); + return 0; + } + \endcode + + \section2 Relevant File Tags + + \table + \header + \li Tag + \li Auto-tagged File Names + \li Since + \li Description + \row + \li \c{"flatbuf.input"} + \li \c{*.fbs} + \li 2.4.0 + \li Source files with this tag are considered inputs to the \c flatc compiler. + \endtable + + \section2 Dependencies + This module depends on the \c flatbuffers module which can be created via the \l{conan}{Conan} + module provider. +*/ + +/*! + \qmlproperty string flatbuf.cpp::compilerName + + The name of the \c flatc binary. + + \defaultvalue \c "flatc" +*/ + +/*! + \qmlproperty string flatbuf.cpp::compilerPath + + The path to the \c flatc binary. + + Use this property to override the auto-detected location. + + \defaultvalue \c auto-detected +*/ + +/*! + \qmlproperty string flatbuf.cpp::filenameExtension + + The extension appended to the generated file names. If not specified, the default extension + (\c ".h") is used. + + This property corresponds to the \c --filename-ext option of the \c flatc tool. + + \nodefaultvalue +*/ + +/*! + \qmlproperty string flatbuf.cpp::filenameSuffix + + The suffix appended to the generated file names. If not specified, the default suffix + (\c "_generated") is used. + + This property corresponds to the \c --filename-suffix option of the \c flatc tool. + + \nodefaultvalue +*/ + +/*! + \qmlproperty pathList flatbuf.cpp::importPaths + + The list of import paths that are passed to the \c flatc tool via the \c -I option. + + \defaultvalue \c [] +*/ + +/*! + \qmlproperty string flatbuf.cpp::includePrefix + + Prefix path prepended to any generated include statements. + + This property corresponds to the \c --include-prefix option of the \c flatc tool. + + \nodefaultvalue +*/ + +/*! + \qmlproperty bool flatbuf.cpp::keepPrefix + + Whether to keep original prefix of schema include statement. + + This property corresponds to the \c --keep-prefix option of the \c flatc tool. + + \defaultvalue \c false +*/ diff --git a/doc/reference/modules/protobufcpp-module.qdoc b/doc/reference/modules/protobufcpp-module.qdoc index 85851c4ae..2c96eaeef 100644 --- a/doc/reference/modules/protobufcpp-module.qdoc +++ b/doc/reference/modules/protobufcpp-module.qdoc @@ -78,6 +78,13 @@ \li 1.18.0 \li This tag is attached to the header files generated by \c protoc compiler. \endtable + + \section2 Dependencies + + The \l protobuf.cpp module requires runtime libraries to be operational. It depends on the + \c "protobuflib" module which can be created by the \l qbspkgconfig or fallback module + providers (the corresponding packages are \c protobuf or \c protobuf-lite). If \l useGrpc is + set to true, the \l protobuf.cpp module also depends on the \c "grpc++" module. */ /*! @@ -101,24 +108,6 @@ */ /*! - \qmlproperty string protobuf.cpp::grpcIncludePath - - The path where grpc++ headers are located. Set this property to override the - default location. - - \defaultvalue \c auto-detected -*/ - -/*! - \qmlproperty string protobuf.cpp::grpcLibraryPath - - The path where the grpc++ library is located. Set this property to override the - default location. - - \defaultvalue \c auto-detected -*/ - -/*! \qmlproperty pathList protobuf.cpp::importPaths The list of imports that are passed to the \c protoc tool via the \c --proto_path option. @@ -131,24 +120,6 @@ */ /*! - \qmlproperty string protobuf.cpp::includePath - - The path where protobuf C++ headers are located. Set this property to override the - default location. - - \defaultvalue \c auto-detected -*/ - -/*! - \qmlproperty string protobuf.cpp::libraryPath - - The path where the protobuf C++ library is located. Set this property to override the - default location. - - \defaultvalue \c auto-detected -*/ - -/*! \qmlproperty string protobuf.cpp::outputDir \readonly diff --git a/doc/reference/modules/qt-core-module.qdoc b/doc/reference/modules/qt-core-module.qdoc index afc4a0f11..6aedf2a69 100644 --- a/doc/reference/modules/qt-core-module.qdoc +++ b/doc/reference/modules/qt-core-module.qdoc @@ -211,6 +211,32 @@ */ /*! + \qmlproperty string Qt.core::generatedHeadersDir + + The directory where tools that generate headers (such as \c moc or \c uic) put resulting + files. + + Normally, you don't need to change this property. The one use-case is when there are several + files with the same file name in the Product. The file name produced by \c moc is based + only on the source file's base file name (without the directory path) which leads to a conflict + in the mentioned case. You can resolve the conflict by setting this property to a non-default + value for one of the files. For example: + + \code + QtApplication { + files: ["my_cool_header.h", "main.cpp"] + Group { + name: "legacy" + files: "legacy/my_cool_header.h" + Qt.core.generatedHeadersDir: "qt.legacy.headers" + } + } + \endcode + + \defaultvalue \c product.buildDirectory + "/qt.headers" +*/ + +/*! \qmlproperty bool Qt.core::metaTypesInstallDir The directory to install the metatypes file into. If this property is empty or undefined, @@ -352,6 +378,14 @@ */ /*! + \qmlproperty string Qt.core::qdocOutputDir + + The directory name where the \c qdoc tool writes its output. + + \defaultvalue \c{product.buildDirectory + "/qdoc_html"} +*/ + +/*! \qmlproperty string Qt.core::qmBaseName The base name of the \c .qm file to be built from the \c .ts files in the @@ -363,6 +397,14 @@ */ /*! + \qmlproperty string Qt.core::qmDir + + The directory name where to put the \c .qm file to be built. + + \defaultvalue \l{Product::destinationDirectory}{product.destinationDirectory} +*/ + +/*! \qmlproperty string Qt.core::qtBuildVariant Specifies the type of Qt libraries to build against: \c "debug" or @@ -468,3 +510,11 @@ \defaultvalue \c{versionParts[2]} */ + +/*! + \qmlproperty bool Qt.core::useRPaths + + Whether to add \l{Qt.core::libPath}{Qt.core.libPath} to \l{cpp::rpaths}{cpp.rpaths}. + + \defaultvalue \c true on Linux, \c false everywhere else. +*/ |