Skip to content

Commit 54f5d26

Browse files
committed
Setup template
0 parents  commit 54f5d26

File tree

118 files changed

+3799
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3799
-0
lines changed

Diff for: .clang-format

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
AlignAfterOpenBracket: DontAlign
5+
AllowShortBlocksOnASingleLine: Empty
6+
AllowShortFunctionsOnASingleLine: Empty
7+
AllowShortCaseLabelsOnASingleLine: false
8+
AllowShortIfStatementsOnASingleLine: false
9+
AllowShortLambdasOnASingleLine: Empty
10+
AllowShortLoopsOnASingleLine: false
11+
AllowAllConstructorInitializersOnNextLine: false
12+
BinPackArguments: false
13+
BinPackParameters: false
14+
ColumnLimit: 100
15+
16+
...

Diff for: .clang-tidy

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
Checks: >
3+
*,
4+
-android-*,
5+
-abseil-*,
6+
-altera-*,
7+
-darwin-*,
8+
-fuchsia-*,
9+
-google-*,
10+
-objc-*,
11+
-zircon-*,
12+
-llvm*,
13+
-hicpp*,
14+
-cppcoreguidelines-non-private-member-variables-in-classes,
15+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
16+
-cppcoreguidelines-macro-usage,
17+
-cppcoreguidelines-pro-type-vararg,
18+
-cppcoreguidelines-avoid-magic-numbers,
19+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
20+
-readability-magic-numbers,
21+
-readability-function-cognitive-complexity,
22+
-misc-non-private-member-variables-in-classes,
23+
-clang-analyzer-optin.cplusplus.UninitializedObject,
24+
-misc-static-assert,
25+
-modernize-use-trailing-return-type,
26+
-modernize-use-nullptr,
27+
-bugprone-easily-swappable-parameters,
28+
-bugprone-exception-escape,
29+
-cert-env33-c,
30+
-cert-err58-cpp
31+
32+
# -modernize-use-nullptr is deactivated for x86
33+
# See: https://github.com/llvm/llvm-project/issues/53778
34+
35+
WarningsAsErrors: '*'
36+
HeaderFilterRegex: ''
37+
FormatStyle: none
38+
39+
CheckOptions:
40+
- { key: readability-identifier-naming.NamespaceCase, value: CamelCase }
41+
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
42+
- { key: readability-identifier-naming.PrivateMemberPrefix, value: m_ }
43+
- { key: readability-identifier-naming.StructCase, value: CamelCase }
44+
- { key: readability-identifier-naming.ClassMethodCase, value: lower_case }
45+
- { key: readability-identifier-naming.ClassMemberCase, value: lower_case }
46+
- { key: readability-identifier-naming.FunctionCase, value: lower_case }
47+
- { key: readability-identifier-naming.VariableCase, value: lower_case }
48+
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
49+
- { key: readability-identifier-length.MinimumVariableNameLength, value: 2 }
50+
- { key: readability-identifier-length.MinimumParameterNameLength, value: 2 }
51+
- { key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors, value: '1' }
52+
- { key: misc-include-cleaner.IgnoreHeaders, value: "SDL3/SDL\.h" }

Diff for: .editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

Diff for: .gitattributes_example

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.png filter=lfs diff=lfs merge=lfs -text
2+
*.jpg filter=lfs diff=lfs merge=lfs -text
3+
*.jpeg filter=lfs diff=lfs merge=lfs -text
4+
*.gif filter=lfs diff=lfs merge=lfs -text
5+
*.ico filter=lfs diff=lfs merge=lfs -text
6+
*.icns filter=lfs diff=lfs merge=lfs -text
7+
*.bmp filter=lfs diff=lfs merge=lfs -text
8+
*.tif filter=lfs diff=lfs merge=lfs -text
9+
*.tiff filter=lfs diff=lfs merge=lfs -text
10+
*.webp filter=lfs diff=lfs merge=lfs -text
11+
*.mp4 filter=lfs diff=lfs merge=lfs -text
12+
*.webm filter=lfs diff=lfs merge=lfs -text
13+
*.ttf filter=lfs diff=lfs merge=lfs -text

Diff for: .github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: MartinHelmut

Diff for: .github/workflows/release.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
os: [ macos-14, ubuntu-latest, windows-latest ]
17+
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Configure CMake
24+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
25+
26+
- name: Build
27+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
28+
29+
- name: Test
30+
working-directory: ${{github.workspace}}/build
31+
run: ctest -C ${{env.BUILD_TYPE}}

Diff for: .gitignore

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Application build output
2+
build/
3+
distribution/
4+
5+
# Created by CPack when executing tests.
6+
Testing/
7+
8+
# Generated by the profiler on debug.
9+
profile.json
10+
*-profile.json
11+
12+
# Created by running the application.
13+
*.log
14+
15+
# User defined CMake preset file.
16+
CMakeUserPresets.json

Diff for: CMakeLists.txt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
3+
include(cmake/UniversalAppleBuild.cmake)
4+
5+
project(
6+
BasicGuiProjectSetup
7+
DESCRIPTION "Base GUI project setup."
8+
VERSION 1.0.0
9+
LANGUAGES CXX)
10+
11+
set(PROJECT_COMPANY_NAME "My Company")
12+
set(PROJECT_COMPANY_NAMESPACE "com.mycompany") # Reverse domain name notation
13+
14+
include(cmake/StandardProjectSettings.cmake)
15+
include(GNUInstallDirs)
16+
17+
# Link this "library" to use the warnings specified in CompilerWarnings.cmake.
18+
add_library(project_warnings INTERFACE)
19+
include(cmake/CompilerWarnings.cmake)
20+
set_project_warnings(project_warnings)
21+
22+
enable_testing()
23+
24+
add_subdirectory(packaging)
25+
add_subdirectory(vendor)
26+
add_subdirectory(src)

Diff for: CMakePresets.json

+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
{
2+
"version": 6,
3+
"configurePresets": [
4+
{
5+
"name": "debug",
6+
"displayName": "Debug",
7+
"generator": "Ninja",
8+
"binaryDir": "build/debug",
9+
"cacheVariables": {
10+
"CMAKE_BUILD_TYPE": "Debug"
11+
}
12+
},
13+
{
14+
"name": "release",
15+
"displayName": "Release",
16+
"generator": "Ninja",
17+
"binaryDir": "build/release",
18+
"cacheVariables": {
19+
"CMAKE_BUILD_TYPE": "Release"
20+
}
21+
},
22+
{
23+
"name": "xcode-debug",
24+
"displayName": "Debug (Xcode)",
25+
"generator": "Xcode",
26+
"binaryDir": "build/xcode-debug",
27+
"cacheVariables": {
28+
"CMAKE_BUILD_TYPE": "Debug"
29+
},
30+
"condition": {
31+
"type": "equals",
32+
"lhs": "${hostSystemName}",
33+
"rhs": "Darwin"
34+
}
35+
},
36+
{
37+
"name": "xcode-release",
38+
"displayName": "Release (Xcode)",
39+
"generator": "Xcode",
40+
"binaryDir": "build/xcode-release",
41+
"cacheVariables": {
42+
"CMAKE_BUILD_TYPE": "Release"
43+
},
44+
"condition": {
45+
"type": "equals",
46+
"lhs": "${hostSystemName}",
47+
"rhs": "Darwin"
48+
}
49+
}
50+
],
51+
"buildPresets": [
52+
{
53+
"name": "debug",
54+
"displayName": "Build Debug",
55+
"configurePreset": "debug",
56+
"configuration": "Debug"
57+
},
58+
{
59+
"name": "release",
60+
"displayName": "Build Release",
61+
"configurePreset": "release",
62+
"configuration": "Release",
63+
"targets": [
64+
"App"
65+
]
66+
},
67+
{
68+
"name": "xcode-debug",
69+
"displayName": "Build Debug (Xcode)",
70+
"configurePreset": "xcode-debug",
71+
"configuration": "Debug",
72+
"condition": {
73+
"type": "equals",
74+
"lhs": "${hostSystemName}",
75+
"rhs": "Darwin"
76+
}
77+
},
78+
{
79+
"name": "xcode-release",
80+
"displayName": "Build Release (Xcode)",
81+
"configurePreset": "xcode-release",
82+
"configuration": "Release",
83+
"targets": [
84+
"App"
85+
],
86+
"condition": {
87+
"type": "equals",
88+
"lhs": "${hostSystemName}",
89+
"rhs": "Darwin"
90+
}
91+
}
92+
],
93+
"packagePresets": [
94+
{
95+
"name": "release",
96+
"displayName": "Distribute Release",
97+
"configurePreset": "release",
98+
"configurations": [
99+
"Release"
100+
]
101+
},
102+
{
103+
"name": "xcode-release",
104+
"displayName": "Distribute Release (Xcode)",
105+
"configurePreset": "xcode-release",
106+
"configurations": [
107+
"Release"
108+
],
109+
"condition": {
110+
"type": "equals",
111+
"lhs": "${hostSystemName}",
112+
"rhs": "Darwin"
113+
}
114+
}
115+
],
116+
"testPresets": [
117+
{
118+
"name": "all",
119+
"displayName": "Test All",
120+
"configurePreset": "debug"
121+
}
122+
],
123+
"workflowPresets": [
124+
{
125+
"name": "dist",
126+
"displayName": "Distribution Workflow",
127+
"steps": [
128+
{
129+
"type": "configure",
130+
"name": "release"
131+
},
132+
{
133+
"type": "build",
134+
"name": "release"
135+
},
136+
{
137+
"type": "package",
138+
"name": "release"
139+
}
140+
]
141+
},
142+
{
143+
"name": "xcode-dist",
144+
"displayName": "Distribution Workflow (Xcode)",
145+
"steps": [
146+
{
147+
"type": "configure",
148+
"name": "xcode-release"
149+
},
150+
{
151+
"type": "build",
152+
"name": "xcode-release"
153+
},
154+
{
155+
"type": "package",
156+
"name": "xcode-release"
157+
}
158+
]
159+
}
160+
]
161+
}

0 commit comments

Comments
 (0)