A minimal CMake template for Qt 5 & 6 projects

Overview

Minimal CMake Template for Qt 6 Projects

This project is updated for Qt 6. Visit qt5 branch if you are looking for the Qt 5 template.

This is a minimal, but complete and production-ready CMake project template for Qt 6 projects. This may be a starting point for your new application. If that is not intent to be a cross-platform project, you can clean up that stuffs from the template.

Features

  • Handling all possible Qt stuffs (UI, resources, translations)
  • macOS bundle
  • Windows executable icon

macOS Deployment

If you want to deploy your application on macOS, I would recommend you read below documents.

Windows Deployment

If you want to deploy your application on Windows, I would recommend you read below documents.

References

You might also like...
 cmake-font-lock - Advanced, type aware, highlight support for CMake
cmake-font-lock - Advanced, type aware, highlight support for CMake

cmake-font-lock - Advanced, type aware, highlight support for CMake

Make CMake less painful when trying to write Modern Flexible CMake
Make CMake less painful when trying to write Modern Flexible CMake

Izzy's eXtension Modules IXM is a CMake library for writing Modern flexible CMake. This means: Reducing the amount of CMake written Selecting reasonab

CMake module to enable code coverage easily and generate coverage reports with CMake targets.

CMake-codecov CMake module to enable code coverage easily and generate coverage reports with CMake targets. Include into your project To use Findcodec

unmaintained - CMake module to activate certain C++ standard, feature checks and appropriate automated workarounds - basically an improved version of cmake-compile-features

Compatibility This library provides an advanced target_compile_features() and write_compiler_detection_header(). The problem with those is that they a

[CMake] [BSD-2] CMake module to find ICU

FindICU.cmake A CMake module to find International Components for Unicode (ICU) Library Note that CMake, since its version 3.7.0, includes a FindICU m

muon is an implementation of the meson build system in C with minimal dependencies.

muon muon is an implementation of the meson build system in C with minimal dependencies. Non-features bug-for-bug compatibility with meson. In fact, m

CMake project for BL602 RISC-V processor
CMake project for BL602 RISC-V processor

bl602_cmake_base CMake project for BL602 RISC-V processor How to build NOTE : This project uses a pre-compiled version of the Buffalo SDK (bl_iot_sdk)

A CMake toolchain file for iOS, macOS, watchOS & tvOS C/C++/Obj-C++ development

A CMake toolchain file for iOS, macOS, watchOS & tvOS C/C++/Obj-C++ development

curl cmake module libcurl build with msvc x86

curl-msvc Infomation curl cmake module libcurl build with MSVC10.0 arch (x86 | i386) source from https://github.com/curl/curl tags: curl-7_79_1 Usage

Comments
  • Compile Failed

    Compile Failed

    Issues: image

    It seems that the following is not correct,

    SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
    

    Environment: Qt 5.12, msvc2015_64 cmake 3.12

    opened by BriFuture 1
  • Can't find modules Qt5WidgetsConfig.cmake, qt5widgets-config.cmake

    Can't find modules Qt5WidgetsConfig.cmake, qt5widgets-config.cmake

    Hi, thanks for your tutorial, but when I tried do build your project I had

    Could not find a package configuration file provided by "Qt5Widgets" with any of the following names:

    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake
    

    (on Ubuntu 18.04) Installing of $sudo apt-get install qtbase5-dev has fixed it. References https://github.com/MTG/acousticbrainz-gui/issues/20 https://askubuntu.com/questions/508503/whats-the-development-package-for-qt5-in-14-04

    Can you add this some of this links to READEME? (or can I add add it by pull request?)

    opened by demiurg337 1
  • NO ISSUE

    NO ISSUE

    Hi euler0

    No issues!

    I just wanted to thank you for the work you committed: I just needed a COMPLETE example of QT5 project using cmake, I downloaded your code, adapted to my situation and everything worked fine

    Thanks so much

    Best Regards

    Marco

    P.S.: Pardon me but I did not find any way to communicate with BUT opening a "fake" issue! :-)

    opened by fornyx 1
  • How to automate addition of plugins to bundles?

    How to automate addition of plugins to bundles?

    Could you extend the example with a "how to add Qt Plugins"?

    I am learning about how to configure properly a qt project for deployment but I cannot completely understand the process of exporting the plugins in macosx. In windows I am just copying the plugin directory but it seems that there are smarter solutions (https://stackoverflow.com/questions/35612687/cmake-macos-x-bundle-with-bundleutiliies-for-qt-application). But cannot make them work properly.

    opened by Bardo91 0
Owner
Vincent Lee
Vincent Lee
A template for projects using both libPeConv and MS Detours

A CMake template for projects using MS Detours along with libPeConv.

hasherezade 14 Dec 16, 2022
This tries to be a minimal cmake example, that covers sources resources dependencies and packaging.

Minimal CMake Example This project tries to be a minimal cmake example. It covers sources, resources, dependencies and packaging. I created this proje

Arne Döring 158 Dec 25, 2022
A CMake starter template using CPM

Cmake Starter About A lightweight Cmake project meant for a binary application (not a shared library), tests with catch2 are configured, CPM is the pa

Matt Williams 1 Jul 14, 2022
A template C++ repository, using CMake and Catch

C++ Project Template This is a template project for C++. It uses CMake to build and Catch for unit tests. It is integrated with Travis CI, and builds

Joshua Peterson 49 Oct 23, 2022
An OS-agnostic C++ library template in plain CMake.

?? How to export C++ library This repository provides an OS-agnostic C++ library template with plain CMake files with the following features: distribu

Robotology 302 Dec 17, 2022
A small c++ template with modern CMake

C++/CMake modern boilerplate This is a template for new projects, gives a good CMake base and a few dependencies you most likely want in your project.

Clément Grégoire 276 Jan 3, 2023
Template for reliable, cross-platform C++ project setup using cmake.

The C++ CMake Project Template cmake-init is a sophisticated copy & paste template for modern C and C++ projects. The main goals include support of al

CG Internals 811 Jan 3, 2023
📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.

Setup-free CMake dependency management CPM.cmake is a CMake script that adds dependency management capabilities to CMake. It's built as a thin wrapper

CPM.cmake 1.6k Jan 9, 2023
CMake checks cache helper modules – for fast CI CMake builds!

cmake-checks-cache Cross platform CMake projects do platform introspection by the means of "Check" macros. Have a look at CMake's How To Write Platfor

Cristian Adam 65 Dec 6, 2022
CMake scripts for painless usage of SuiteSparse+METIS from Visual Studio and the rest of Windows/Linux/OSX IDEs supported by CMake

CMake scripts for painless usage of Tim Davis' SuiteSparse (CHOLMOD,UMFPACK,AMD,LDL,SPQR,...) and METIS from Visual Studio and the rest of Windows/Lin

Jose Luis Blanco-Claraco 395 Dec 24, 2022