It's also possible to disable support for these libraries by using -no instead of -qt.Ĭonfigure in Qt 6 relies on CMake to locate third-party libraries. For example, to exclude the Qt Wayland Compositor and the Qt Wayland integration plugin from the Qt build, provide -skip qtwayland as an option to configure. Note that some directories contain multiple Qt modules. Excluding Qt ModulesĬonfigure's -skip option allows top-level source directories to be excluded from the Qt build. Furthermore, each Qt module might have features that can also be explicitly enabled or disabled. Users can explicitly exclude specific top-level directories to limit build times. Qt consists of different modules whose sources can be found in different directories inside the top-level source directory. Use of other generators might work, but is not officially supported. Ninja is both cross-platform, feature-rich, and performant, and recommended on all platforms. Therefore, configure automatically selects a generator for you.Ĭonfigure always uses the Ninja generator and build tool if a ninja executable is available. Note that CMake supports generators that cannot be used with Qt. When configuring, you can select a CMake generator. This is called a static build and can be selected when configuring with the -static option. You can also build Qt such that an executable binary will include all Qt modules it links to and all Qt plugins it needs. The matching configure option is -dynamic. This is called a shared build and is the default configuration on most platforms. Qt Modules can be built as separate libraries that an executable links to and loads at start time (for Qt libraries), or runtime (for Qt plugins). -optimize-size: Optimizes release builds for size instead of speed.-separate-debug-info: Extracts the debug information into a separate file.-force-debug-info: Creates a release build with debug information.There are further options to tweak the configurations: This is only supported if you configure a build for Windows. This option also enables the generation of debug symbols that let you inspect the code and state of the built libraries in a debugger.įinally, -debug-and-release lets you build both a debug and release variant of Qt libraries in one go. debug skips some optimizations to make it easier to debug Qt and its tools. ![]() release tells the compiler to optimize the code, and not provide additional debug symbols alongside Qt and its tools. You can build Qt libraries and tools in various variants, each of them optimized for a different use case. Note: The -developer-build option builds tests by default. To shadow-build, run configure from a separate directory: This method is very convenient if you want to have multiple builds from the same source tree, but for different configurations. This enables you to keep the Qt source tree clean from the build artifacts and binaries, which are stored in a separate directory. It's recommended to keep these directories separate by shadow-building and using the -prefix option. The install directory is where the binaries and libraries are installed, for use either by the system or by the application. The build directory is where the build-related files, such as build system files, object files, and other intermediate files are stored. The source directory contains the source code that is obtained from the source package or git repository. ![]() Delete this file when you want to start over without cached information. Note that CMake caches configure options and information about the environment in a file called CMakeCache.txt. You might want to experiment with different configure flags, and therefore run configure multiple times.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |