Created the Window and Renderer and started implementing the functions

for the game loop
This commit is contained in:
abdelrahman committed 2022-09-10 22:17:58 +01:00
1 parent a0d8b75c11
commit 33066b381e
11 files changed
+280 -24

No files matched your search

+18 -5
View File
@@ -2,6 +2,12 @@ cmake_minimum_required(VERSION 3.10)
project(Engine)
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(DEBUG_ENGINE ON)
endif()
configure_file(engine_build_config.h.in engine_build_config.h)
# VARIABLES
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@@ -12,15 +18,17 @@ if(CMAKE_HOST_WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
set(CMAKE_INSTALL_BINDIR bin)
set(CMAKE_INSTALL_LIBDIR lib)
set(CMAKE_INSTALL_INCLUDEDIR include)
set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../lib")
# TARGETS
add_library(${PROJECT_NAME} SHARED src/engine.c)
add_library(${PROJECT_NAME} SHARED
src/Game.c
src/Window.c
src/Renderer.c
)
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}
include
extern/SDL2/SDL/include
extern/SDL2/SDL_mixer/include
@@ -34,7 +42,12 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
SDL2_ttf
)
install(FILES include/engine.h
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/engine_build_config.h
include/constants.h
include/Game.h
include/Window.h
include/Renderer.h
CONFIGURATIONS Release
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)