commit 46b5638341e60104691a8ad5141dced446b8c05b Author: Andrew Haynes Date: Thu Mar 19 22:50:40 2026 -0400 batman: SDL3 added to CMAKELISTS...with ease? diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..369e701 --- /dev/null +++ b/.clang-format @@ -0,0 +1,19 @@ +--- +BasedOnStyle: Google +Standard: Latest +UseTab: Always +TabWidth: 8 +IndentWidth: 8 +BreakBeforeBraces: Allman +SpaceBeforeCpp11BracedList: true +SeparateDefinitionBlocks: Always +Cpp11BracedListStyle: false +BreakAfterReturnType: TopLevel +AlignTrailingComments: + Kind: Always +ReflowComments: Always +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: AllIfsAndElse +AllowShortLoopsOnASingleLine: true +IndentAccessModifiers: false # Indent access specifiers by one level +AccessModifierOffset: -4 # Optional: adjust offset relative to the class indentation level diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..0b0f492 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,22 @@ +--- +Checks: > + -*, + bugprone-*, + concurrency-*, + misc-*, + modernize-*, + performance-*, + readability-*, + portability-*, + -readability-braces-around-statements, + -readability-implicit-bool-conversion + +WarningsAsErrors: "" + +CheckOptions: + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.FunctionCase + value: lower_case +--- + \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b79a54 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/ +.cache/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..49ff646 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.16) +set(CMAKE_C_STANDARD 23) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +include_directories(include) +project(Chess LANGUAGES C) + +set(SOURCES + src/main.c +) + +include(FetchContent) +FetchContent_Declare(SDL3 + GIT_REPOSITORY https://github.com/libsdl-org/SDL + GIT_TAG release-3.4.2 + GIT_SHALLOW ON + EXCLUDE_FROM_ALL + SYSTEM) +FetchContent_MakeAvailable(SDL3) + +add_executable(Chess ${SOURCES}) +target_link_libraries(Chess PRIVATE SDL3::SDL3) diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..65bc3c2 --- /dev/null +++ b/src/main.c @@ -0,0 +1,7 @@ +#include +#include + +int main() { + printf("%s", "Hello World"); + return 0; +}