First push

This commit is contained in:
Wizzard
2023-12-12 16:13:36 -05:00
commit 65ae6a78f0
5 changed files with 180 additions and 0 deletions

26
CMakeLists.txt Normal file
View File

@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.10)
project(CDoom)
set(CMAKE_CXX_STANDARD 17)
# Include directory for header files
include_directories(${PROJECT_SOURCE_DIR}/src/include)
# Automatically find all .cpp files in src/ and subdirectories
file(GLOB_RECURSE SOURCES "src/*.cpp")
# Find SDL2 library
find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS})
# Find SDL2_ttf library
find_package(SDL2_ttf REQUIRED)
include_directories(${SDL2_TTF_INCLUDE_DIRS})
set(SDL2_TTF_LIBRARIES "/usr/lib/libSDL2_ttf.so")
# Create executable with all source files
add_executable(CDoom ${SOURCES})
# Link SDL2 and SDL2_ttf libraries
target_link_libraries(CDoom ${SDL2_LIBRARIES} ${SDL2_TTF_LIBRARIES})