From 07115e4cb3a0be6d786486fedb61f82cd4342781 Mon Sep 17 00:00:00 2001 From: Felix Suchert Date: Sun, 17 Sep 2023 19:56:25 +0200 Subject: [PATCH] Add CMakeLists.txt and gitignore --- .gitignore | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 18 +++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..12c77cb --- /dev/null +++ b/.gitignore @@ -0,0 +1,70 @@ +### C ### +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +### CMake ### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +### CMake Patch ### +# External projects +*-prefix/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..7d08401 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.20) +set(CMAKE_C_STANDARD 17) +set(CMAKE_C_STANDARD_REQUIRED True) + +project(Tetris) + +add_executable(Tetris src/tetris.c src/gl.c) + +find_package(glfw3 3.3 REQUIRED) +target_link_libraries(Tetris glfw) + +find_package(OpenGL REQUIRED) +target_link_libraries(Tetris OpenGL::GL) + +target_include_directories(Tetris PUBLIC + include/ + ) +