https://github.com/zeindevs/cmake-qt6-template
Qt6 CMake Template
https://github.com/zeindevs/cmake-qt6-template
cmake cpp qt6
Last synced: 4 months ago
JSON representation
Qt6 CMake Template
- Host: GitHub
- URL: https://github.com/zeindevs/cmake-qt6-template
- Owner: zeindevs
- License: mit
- Created: 2024-05-27T07:32:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-01T11:06:03.000Z (about 2 years ago)
- Last Synced: 2025-03-10T01:50:26.668Z (over 1 year ago)
- Topics: cmake, cpp, qt6
- Language: C++
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmake-qt6-template
## Setup
### Shared (MSYS2)
```sh
# Install Qt6 Lib
pacman -S mingw-w64-ucrt-x86_64-qt6-base
cd build
mkdir msys && cd msys
cmake -G "Ninja" ..\.. -DCMAKE_BUILD_TYPE="Debug" # for Debug
cmake -G "Ninja" ..\.. -DCMAKE_BUILD_TYPE="Release" # for Release
```
### Static (MSVC)
```sh
# Download Qt6 Static from https://github.com/gmh5225/static-build-qt6/releases/tag/qt6_660_static
cd build
mkdir msvc && cd msvc
cmake -G "Visual Studio 17 2022" ..\.. -DCMAKE_CONFIGURATION_TYPES="Release"
cmake --build . --config Release
cmake --install .
```
## Run
```sh
# msys
make run-debug
make run-release
# msvc
make run-static-release
```
## License
Copyright (c) 2024 zeindevs. Licensed under The MIT License